Repository navigation
Conversation
PHPStan ran on PHP 8.2 and 8.3 only. PHP 8.5 is the only matrix cell that installs TYPO3 v15, so CI did not analyse the code against v15. With v15, PHPStan reports the baseline entry for the method_exists() check on Bootstrap::loadExtTables() as unmatched. The method exists in TYPO3 v14.3 only. Move the entry from the baseline to phpstan.neon and set reportUnmatched: false. With v14 the entry suppresses the error, and with v15 PHPStan does not report the unused entry. Remove the PHP version condition of the PHPStan step. A comment in Testbase::loadExtensionTables() points to the entry. An inline @PHPStan-Ignore comment does not work here: with v15, PHPStan reports it as unmatched as well. Resolves: TYPO3#759 Releases: main Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
CybotTM
force-pushed
the
task/ci-phpstan-all-php
branch
from
November 15, 2026 08:48
111c151 to
61ad152
Compare
CybotTM
marked this pull request as ready for review
November 15, 2026 08:48
wouter90
approved these changes
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHPStan now runs on every PHP version of the CI matrix. This includes PHP 8.5, the only cell that installs TYPO3 v15. The ignore entry for the
method_exists()check onBootstrap::loadExtTables()moves from the baseline tophpstan.neonwithreportUnmatched: false, because the method exists in TYPO3 v14.3 only.Resolves #759
How to reproduce and test
On main,
Build/Scripts/runTests.sh -p 8.5 -s composerUpdate && Build/Scripts/runTests.sh -p 8.5 -s phpstanreports one error: the baseline entry for that check inClasses/Core/Testbase.phpis unmatched (ignore.unmatched). PHP 8.2, 8.3 and 8.4 install TYPO3 v14.3, and PHPStan passes there.Results with this branch, run locally with
-b docker:typo3/cms-corecgl -non PHP 8.2 finds 0 of 65 files to fix. Without the newignoreErrorsentry, PHPStan on PHP 8.2 reports theloadExtTableserror again, so v14 still needs the entry.The change touches the CI workflow, the PHPStan configuration and one code comment. It does not change code that runs, so the TYPO3 Core test suites are not affected.
Why not an inline ignore comment
An inline
// @phpstan-ignore function.alreadyNarrowedTypeabove the check has the same problem as the baseline entry. With v14 it passes. With v15 PHPStan reports "No error with identifier function.alreadyNarrowedType is reported on line 938." Only the global optionreportUnmatchedIgnoredErrors: falsewould silence that, and it would do so for every ignore in the project. The entry inphpstan.neonturns off the unmatched report for this one entry only. A comment at the check points to it.Why CGL keeps its condition
CGL still runs on PHP 8.3 and lower only. Its result does not depend on the installed packages. php-cs-fixer itself recommends the lowest supported PHP version: "It is recommended to run PHP CS Fixer on PHP 8.2". On PHP 8.4 and 8.5 it also finds 0 files to fix.