Use of Symfony Expression Language "Expression" in OptimizedPhpArrayDumperTest doesn't match library

Created on 7 April 2017, over 7 years ago
Updated 26 February 2023, over 1 year ago

Follow-up to #2747083: drupal/core-dependency-injection wrongly requires symfony/expression-language

Problem/Motivation

If you install the Expression Language library from symfony the test suite fails.

Missing argument 1 for Symfony\Component\ExpressionLanguage\Expression::__construct(), called in /.../core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php on line 577 and defined
 /.../vendor/symfony/expression-language/Expression.php:28
 /.../core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php:577

Note: this constructor has always been this way, the Mock object was just made as small as possible and an emergent bug was created.
https://github.com/symfony/expression-language/blob/2.4/Expression.php

Steps to reproduce

  1. Clone drupal
  2. composer require symfony/expression-language
  3. ./vendor/bin/phpunit -c core core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php

Proposed resolution

Pass an argument to the Expression constructor and provide a empty constructor with an argument to ensure new tests don't make the same mistake.

API changes

n/a tests

Data model changes

n/a tests

🐛 Bug report
Status

Fixed

Version

9.4

Component
PHPUnit 

Last updated about 8 hours ago

Created by

🇺🇸United States neclimdul Houston, TX

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024