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

Comments

neclimdul created an issue. See original summary.

neclimdul’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

patch

neclimdul’s picture

Version: 8.1.x-dev » 8.4.x-dev

derp, fix branch. we can surely backport this but I doubt its going back that far.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

kyvour’s picture

StatusFileSize
new1.02 KB
new1.36 KB

Patch #2 is updated for 8.5.x-dev branch.
Also access modifier was added to the Expression class constructor.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

ranjith_kumar_k_u’s picture

StatusFileSize
new1 KB

Re-rolled #5 for 9.4

neclimdul’s picture

Issue summary: View changes
Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community

This is pretty straight forward so just going to put this to RTBC. That said, moving the priority down because the number of people trying to run the the core test suite with the expression language is basically 0 as evidenced by the activity on this issue. :)

  • catch committed 3f8d0bd on 10.0.x
    Issue #2867871 by kyvour, neclimdul, ranjith_kumar_k_u: Use of Symfony...

  • catch committed be061dc on 9.4.x
    Issue #2867871 by kyvour, neclimdul, ranjith_kumar_k_u: Use of Symfony...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

quietone’s picture