Bug #105582
closedPHPstan crash after update to 13.4.1
0%
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
Updated by Lars Lüthi about 22 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.
Updated by S P about 22 hours ago
Was about to write teh same.
Explciitly requiring "phpstan/phpdoc-parser": "1.*"
makes our v12 setups work again.
Updated by Benjamin Franzke about 22 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
Updated by Andreas Kienast about 20 hours ago
- Has duplicate Bug #105584: Exception: Too few arguments to function Lexer in StringTypeResolver.php added
Updated by Benjamin Franzke about 7 hours ago
- Related to Task #105586: Composer tests fail because of symfony/type-info not being phpstan/phpdoc-parser v2 compatible added