#110772Update to PHPStan v2.2.15
Description
The nightly pipelines of all maintained branches fail in the job “phpstan php 8.x max”, which updates all dependencies to their latest version and thus to PHPStan v2.2.15:
- main: https://git.typo3.org/typo3/CI/cms/-/pipelines/109126
- 14.3: https://git.typo3.org/typo3/CI/cms/-/pipelines/109127
- 13.4: https://git.typo3.org/typo3/CI/cms/-/pipelines/109128
PHPStan v2.2.15 knows that vsprintf only throws a ValueError (https://github.com/phpstan/phpstan-src/pull/6517) and reports the ArgumentCountError catch in LogDataTrait as dead catch on all branches, which is valid.
On main and 14.3, which globally disable treatPhpDocTypesAsCertain, it further reports two false positives caused by a regression in the native type of by-reference arguments (https://github.com/phpstan/phpstan-src/pull/6463, https://github.com/phpstan/phpstan/issues/15297). It is fixed upstream but not yet released (https://github.com/phpstan/phpstan-src/pull/6564):
- the null coalescing on the scope match in CorrelationId::fromString, which is redundant as PREG_UNMATCHED_AS_NULL always provides the offset
- the is_array check after the workspace overlay in SuggestWizardDefaultReceiver, which is required as workspaceOL can set the record to false
Update PHPStan to v2.2.15 on all maintained branches, remove the dead catch and the redundant null coalescing, and add the remaining false positive to the PHPStan baseline until the upstream fix is released.
Reviews 6
History 14
-
Gerrit Code Review pushed patch set 1 for main to change 96033 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-24T11:43:54+00:00" > 09/24/26, 11:43 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96034 <span data-processor="relativetime" data-value="2026-09-24T11:43:58+00:00" > 09/24/26, 11:43 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 96035 <span data-processor="relativetime" data-value="2026-09-24T11:44:00+00:00" > 09/24/26, 11:44 </span>
-
Stefan Bürk commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-24T12:30:20+00:00" > 09/24/26, 12:30 </span>
Applied in changeset commit:23a584bf722a6f8c693833c2dcc10da2e66f85a0.