Skip to content

Commit 65439ac

Browse files
authored
fix(tests): pin symfony/deprecation-contracts to ^2.5 in Drupal 9.5 fixture (#4049)
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.
1 parent f8b39c4 commit 65439ac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/Frameworks/Drupal/Version_9_5/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"composer/installers": "^1.9",
1313
"drupal/core": "self.version",
1414
"drupal/core-project-message": "self.version",
15-
"drupal/core-vendor-hardening": "self.version"
15+
"drupal/core-vendor-hardening": "self.version",
16+
"symfony/deprecation-contracts": "^2.5"
1617
},
1718
"require-dev": {
1819
"behat/mink": "^1.8",

0 commit comments

Comments
 (0)