Issue Bug Closed

#105582PHPstan crash after update to 13.4.1

Guido Twieling 11/12/24, 13:00 updated 11/12/24, 14:00

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 

Reviews 3

Files 1

History 8

  1. Lars Lüthi commented <span data-processor="relativetime" data-value="2024-11-12T13:18:31+00:00" > 11/12/24, 13:18 </span>

    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.

  2. S P commented <span data-processor="relativetime" data-value="2024-11-12T13:21:32+00:00" > 11/12/24, 13:21 </span>

    Was about to write teh same.

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

  3. Benjamin Franzke commented and changed status New Closed <span data-processor="relativetime" data-value="2024-11-12T13:59:45+00:00" > 11/12/24, 13:59 </span>

    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