Problem/Motivation

Symfony 2.8.4 has been released. Since we are now targeting Symfony version ~2.8 in our composer.json file this means that any project that uses a composer based workflow receives 2.8.4 as soon as they update their dependencies.

Proposed resolution

Update to Symfony 2.8.4 and fix any issues that arise.

Remaining tasks

User interface changes

None expected.

API changes

Some changes to interface signatures expected in Symfony components. It still needs to be determined if this affects Drupal code.

None.

Data model changes

None expected.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pfrenssen created an issue. See original summary.

pfrenssen’s picture

Title: Update to Symfony 2.8.3 » Update to Symfony 2.8.4
Issue summary: View changes
pfrenssen’s picture

Kicking this off by launching a test with updated dependencies. I also updated the version strings to track point releases ~2.8.4. It was originally configured to follow minor releases ~2.8. This seems better to me from the perspective of someone who uses composer to manage their projects. We are already seeing minor bugs pop up when updating Symfony point releases, let alone in minor releases. Discussion welcome.

Expecting some failures similar to this, we encountered this when running Behat tests against updated Symfony components (ref https://github.com/jhedstrom/drupalextension/pull/266).

Runtime Notice: Declaration of Symfony\Component\DependencyInjection\DefinitionDecorator::setFactoryService() should be compatible with Symfony\Component\DependencyInjection\Definition::setFactoryService($factoryService, $triggerDeprecationError = true) in drupal/vendor/symfony/dependency-injection/DefinitionDecorator.php line 222

pfrenssen’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: 2702677-3.patch, failed testing.

pfrenssen’s picture

Promising, there was only one failure and it looks like a random test failure.

pfrenssen’s picture

Status: Needs work » Needs review
pfrenssen’s picture

Issue summary: View changes
pfrenssen’s picture

Priority: Major » Normal

It seems that the interface compatibility notices we were getting in the tests for Behat Drupal Extension are due to version conflicts between Symfony components with different point releases. As long as all packages are in sync this does not appear to be a problem.

Since we are updating all Symfony components at once this interface mismatch does not affect Drupal core. Affected projects can easily fix it by checking the versions in their composer.lock file. Lowering priority to normal.

jibran’s picture

jibran’s picture

Status: Needs review » Reviewed & tested by the community
Parent issue: » #2611816: Update to symfony 2.8
Related issues: +#2703319: Update to symfony/css-selector 2.8

Everything is passing here so RTBC.

chrko’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
21.16 KB
chrko’s picture

I don't think that the version constraint should be updated from "~2.8" to "~2.8.4" because the tilde operator includes the version 2.8.4 and following version, so I ran only composer update on the symfony packages. Are there any bug fixes in symfony 2.8.4 we are depending on?
Additionally according to the original patch I updated the version constraint of the css-selector component referencing also the issue #2703319: Update to symfony/css-selector 2.8 of @jibran.

pfrenssen’s picture

@chrko, can you please give some more reasoning why you think it should be "~2.8"? If you use "~2.8" then you basically are declaring that the current version of Drupal 8 is compatible with Symfony 2.8, 2.9, 2.10 and so on.

As I explained in my comment #3 whatever we put in our composer.json file does not only affect Drupal core itself, but also projects that are built with composer. If you use the version "~2.8" then Symfony will update to 2.9 as soon as it is released for Composer based projects.

I think we can expect this to cause projects to break, in fact we have already seen breakage when updating to new minor Symfony releases in the past. See for example #2611816: Update to symfony 2.8 and #2278353: Update to Symfony 2.5.

chrko’s picture

Okay, unfortunately symfony minor versions are integrating some features and bug fixes which aren't backward compatible.
But back to the version constraint and composer: The composer.json included in drupal core should fit the core requirements. If a third party project needs a more limiting version constraint they should include these in their composer version constraints.
Following the semantic versioning scheme we should depend on "~2.8" because minor versions updates shouldn't break existing code. Also in this specific case symfony2.8 will be the last minor release of the symfony2 branch according to the project homepage.

We should monitor the behaviour of symfony upgrades again starting at 3.* because the readjustment of the release and development cycle of their components. I think they also noticed that they are sometimes breaking some parts of the semantic versioning.
So my proposal is the following: Staying at "~2.8" and evaluate the behaviour during minor release upgrades of the symfony3 branch.

dawehner’s picture

@chrko, can you please give some more reasoning why you think it should be "~2.8"? If you use "~2.8" then you basically are declaring that the current version of Drupal 8 is compatible with Symfony 2.8, 2.9, 2.10 and so on.

To be clear, ~2.8.2 will allow to add 2.9 as well, if there is any dependency in some other package.json file

jibran’s picture

Status: Needs review » Reviewed & tested by the community

#12 also works.

catch’s picture

Issue tags: +rc target

Committed f1d08c2 and pushed to 8.2.x. Thanks!

Leaving RTBC for 8.1.x and tagging rc target. I'd like to get this in if we can during the rc, although theoretically the patch release update could also happen in a patch release.

  • catch committed f1d08c2 on 8.2.x
    Issue #2702677 by pfrenssen, chrko: Update to Symfony 2.8.4
    
pfrenssen’s picture

Thanks! I just checked the patch against 8.1.x and it applies cleanly.

alexpott’s picture

+1 to this issue being an rc target. Shipping releases with the latest versions of dependencies seems like a good idea to me.

  • catch committed e870033 on 8.1.x
    Issue #2702677 by pfrenssen, chrko: Update to Symfony 2.8.4
    
    (cherry...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Cherry-picked to 8.1.x, thanks!

xjm’s picture

Issue tags: +8.1.0 release notes

Status: Fixed » Closed (fixed)

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