Review 14.3 Merged

96034[TASK] Update PHPStan to v2.2.15

Stefan Bürk CR +2 V +2 Easy +14 −8 updated 09/24/26, 12:26

Commit message

Updates the PHPStan development dependency from `^2.2.14` to
`^2.2.15`, keeping all maintained branches on the same version.

PHPStan v2.2.15 knows that `vsprintf()` only throws a `ValueError`
[1] and reports the `ArgumentCountError` catch in `LogDataTrait`
as dead catch on all branches, which is valid and therefore
removed.

On main and v14.3, which disable `treatPhpDocTypesAsCertain`
globally, it further reports two false positives caused by a
regression of the native type of by-reference arguments [2][3],
which is fixed upstream [4] but not released yet:

* The null coalescing on the `scope` match in
  `CorrelationId::fromString()` is redundant anyway, because
  `PREG_UNMATCHED_AS_NULL` always provides the offset. It is
  removed on all branches.
* The `is_array()` check after the workspace overlay in
  `SuggestWizardDefaultReceiver` is required, because
  `BackendUtility::workspaceOL()` can set the record to false.
  It is added to the PHPStan baseline of main and v14.3 until
  the upstream fix is released, which will then report the
  unmatched baseline entry for removal.

[1] https://github.com/phpstan/phpstan-src/pull/6517
[2] https://github.com/phpstan/phpstan-src/pull/6463
[3] https://github.com/phpstan/phpstan/issues/15297
[4] https://github.com/phpstan/phpstan-src/pull/6564

Executed commands:

> Build/Scripts/runTests.sh -s composer -- \
      require --dev phpstan/phpstan:^2.2.15
> Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 1

Files 5

Review log 34

  1. Stefan Bürk uploaded patch set 1 09/24/26, 11:43

  2. core-ci voted on patch set 1 V +1 09/24/26, 11:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109151

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 09/24/26, 12:26

  4. Stefan Bürk merged patch set 2 09/24/26, 12:26