fix(tests): pin symfony/deprecation-contracts to ^2.5 in Drupal 9.5 fixture - #4049
Merged
Leiyks merged 1 commit intoJul 24, 2026
Merged
Conversation
…ixture test_web_drupal_95 was crashing during Drupal's install script with a fatal TypeError on PHP 7.4. The Drupal 9.5 composer.json has no lock file, so `composer install --ignore-platform-reqs` resolves guzzlehttp/ guzzle to the latest 7.15.1, which pulls in symfony/deprecation- contracts v3.7.1. That version's trigger_deprecation() signature uses a `mixed ...$args` variadic typehint, which is only valid on PHP 8.0+ and is a fatal TypeError when the class is loaded/called on PHP 7.4. --ignore-platform-reqs defeats platform.php's PHP version pin, so composer happily selects a dependency graph that is incompatible with the PHP version the job actually runs. Pin symfony/deprecation-contracts to ^2.5 directly in the fixture's require block so composer's solver is constrained to a version whose API is compatible with PHP 7.4, regardless of what guzzle pulls in transitively.
|
Leiyks
marked this pull request as ready for review
July 21, 2026 12:05
bwoebi
approved these changes
Jul 23, 2026
Leiyks
deleted the
leiyks/fix-test-web-drupal-95-php74-deprecation-contracts
branch
July 24, 2026 11:45
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.
What
symfony/deprecation-contractsto^2.5in therequireblock oftests/Frameworks/Drupal/Version_9_5/composer.json.Why
test_web_drupal_95was failing with a fatalTypeErrorduring Drupal'sinstall script on PHP 7.4.
The Drupal 9.5 test fixture ships a
composer.jsonwith no accompanyinglock file, and the job installs dependencies with
composer install --ignore-platform-reqs. Without a lock file, composer'ssolver is free to pick the latest compatible releases of every
transitive dependency;
--ignore-platform-reqsadditionally defeats thefixture's
platform.phpPHP-version pin, so composer happily resolves adependency graph that isn't actually compatible with the PHP version the
job runs on.
Concretely, composer resolves
guzzlehttp/guzzleto7.15.1, whichrequires
symfony/deprecation-contractsand drifts tov3.7.1. Thatversion's
trigger_deprecation()function declares amixed ...$argsvariadic parameter — a typehint combination only valid on PHP 8.0+.
Loading/calling it on PHP 7.4 is a fatal
TypeError, which abortsDrupal's install script and fails the job.
How
Add an explicit
"symfony/deprecation-contracts": "^2.5"entry to thefixture's
requireblock. This constrains composer's solver to adeprecation-contractsrelease whose API predates the PHP 8-onlyvariadic typehint, regardless of what
guzzle(or any other transitivedependency) would otherwise pull in.