build: upgrade to PHP 8.5#596
Open
kayjoosten wants to merge 4 commits into
Open
Conversation
Mockery 1.7.x-dev has two methods with implicit nullable typed params (array $arguments = null, array $objects = null) that trigger E_DEPRECATED in PHP 8.4+. In RunInSeparateProcess tests, PHP subprocesses start with default error_reporting, causing these notices to appear on STDERR before the test result, which PHPUnit treats as test errors. Fix: add a post-install/update script that patches the two signatures in Mockery.php. Also suppress E_DEPRECATED in test bootstrap and update phpunit.xml to PHPUnit 10 schema with source filtering.
Scrutinizer's auto-detected test runner (php-scrutinizer-run) fails with PHP 8.5. Specify the test command explicitly so it uses the project phpunit.xml with correct error_reporting and bootstrap.
Contributor
Author
|
As discussed ignore the Scrutinizer it's not a mandatory check anyway so we can merge after review. |
Contributor
|
Rector wants to update 170 files. Maybe good to run those after this is merged. |
johanib
reviewed
Jun 18, 2026
| @@ -0,0 +1,19 @@ | |||
| <?php | |||
|
|
|||
| $file = __DIR__ . '/../../vendor/mockery/mockery/library/Mockery.php'; | |||
Contributor
There was a problem hiding this comment.
Mockery does not support 85?
Big ouch 🤒
I guess ok for now, maybe mockery will catch up. Otherwise, migrate to phpunit. But a quick look shows 80 tests need to be converted.
Contributor
There was a problem hiding this comment.
Have you tried mockery 1.6.12 instead of the 1.7 dev? I tried it composer phpunit seems to run fine on that version?.
| > | ||
| <php> | ||
| <ini name="error_reporting" value="-1"/> | ||
| <ini name="error_reporting" value="24575"/><!-- E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED --> |
|
|
||
| // Suppress vendor E_DEPRECATED notices (e.g. Mockery implicit nullable params in PHP 8.4+) | ||
| // before autoloading to avoid noise in RunInSeparateProcess subprocess output. | ||
| error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED); |
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.
Summary
composer.jsonfrom^8.2to^8.5composer.lockto PHP 8.5php85-apache2-node24:latestNotes
Rector dry-run confirmed zero code changes required codebase already PHP 8.5 compatible.
Test plan
test-integrationworkflow uses new php85 image)composer installworks in the new container