Project

General

Profile

Actions

Bug #105582

closed

PHPstan crash after update to 13.4.1

Added by Guido Twieling about 20 hours ago. Updated about 19 hours ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2024-11-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
crash, frontend, after update
Complexity:
Is Regression:
Sprint Focus:

Description

Hello.

Just updated to typo3 13.4.1. Backend is running. Frontend crashes with ArgumentCountError in phpstan.
See error.log

Core: Exception handler (WEB: FE): ArgumentCountError, code #0,
file /var/www/html/vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php, line 102:
Too few arguments to function PHPStan\PhpDocParser\Lexer\Lexer::__construct(),
0 passed in /var/www/html/vendor/symfony/type-info/TypeResolver/StringTypeResolver.php on line 66 

Files

typo3_9d87e00b26.log (54.9 KB) typo3_9d87e00b26.log Guido Twieling, 2024-11-12 13:00

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Task #105586: Composer tests fail because of symfony/type-info not being phpstan/phpdoc-parser v2 compatibleUnder Review2024-11-13

Actions
Has duplicate TYPO3 Core - Bug #105584: Exception: Too few arguments to function Lexer in StringTypeResolver.phpClosed2024-11-12

Actions
Actions #1

Updated by S P about 20 hours ago

Confirmed. Also in v12.

Actions #2

Updated by Lars Lüthi about 20 hours ago · Edited

A temporary fix is to downgrade phpstan/phpdoc-parser from 2.0.0 to 1.33.0

composer req phpstan/phpdoc-parser:^1.33

See https://typo3.slack.com/archives/C03AM9R17/p1731413624808949 for more context.

Actions #3

Updated by S P about 20 hours ago

Was about to write teh same.

Explciitly requiring "phpstan/phpdoc-parser": "1.*" makes our v12 setups work again.

Actions #4

Updated by Benjamin Franzke about 19 hours ago · Edited

  • Status changed from New to Closed

We decided against a new TYPO3 release as this issue will be fixed by an upcoming symfony/type-info release (see https://github.com/symfony/symfony/pull/58800) and is unrelated to todays TYPO3 release.

It was caused revealed by https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 which was released 11:26 UTC today and allowed to upgrade phpstan/phpdoc-parser to 2.x, which revealed an invalid dependency constraint in symfony/type-info.

We recommend the following hotfix to downgrade phpstan/phpdoc-parser to 1.x in composer-mode instances:

composer update phpstan/phpdoc-parser --with "phpstan/phpdoc-parser:^1" 

This will update composer.lock only and will allow to update to phpstan/phpdoc-parser 2.x once a fix to symfony/type-info has been released.

Edit: Updated above commands as suggested in https://github.com/symfony/symfony/pull/58800#issuecomment-2470818742 – previous recommendation was:

composer require phpstan/phpdoc-parser:^1
composer remove --no-update phpstan/phpdoc-parser

Actions #5

Updated by Benjamin Franzke about 19 hours ago

  • Description updated (diff)
Actions #6

Updated by Benjamin Franzke about 19 hours ago

  • Description updated (diff)
Actions #7

Updated by Andreas Kienast about 18 hours ago

  • Has duplicate Bug #105584: Exception: Too few arguments to function Lexer in StringTypeResolver.php added
Actions #8

Updated by Benjamin Franzke about 4 hours ago

  • Related to Task #105586: Composer tests fail because of symfony/type-info not being phpstan/phpdoc-parser v2 compatible added
Actions

Also available in: Atom PDF