Problem/Motivation

The Symfony 3 will be end of life in 2021. This means we need to be ready to move to Symfony 4.4 before then. This is a major trigger to releasing Drupal 9 in 2020. See #3007300: [META] Release Drupal 9 on June 3 2020. While Symfony 5 will be available by the time Drupal 9 comes around, it will be the first release to only receive security fixes for 8 months (https://symfony.com/blog/symfony-maintenance-changes-for-standard-releases) so given that Drupal core is supported for 12 months, Drupal 9 cannot adopt Symfony 5.

Proposed resolution

Update to Symfony 4.4.

Remaining tasks

  1. First need to be compatible with Symfony 4.4. See #2976394: Allow Symfony 4.4 to be installed in Drupal 8 which is a testing issue to find Symfony 4 compatibility issues in Drupal 8 itself.
  2. Once that works, we need a patch to actually update to Symfony 4.4. (Part of #2976394: Allow Symfony 4.4 to be installed in Drupal 8 has that patch, but we would need a separate issue likely to commit to Drupal 9).

User interface changes

None.

API changes

None directly in this issue.

Data model changes

None directly in this issue.

Comments

Gábor Hojtsy created an issue. See original summary.

gábor hojtsy’s picture

Issue summary: View changes
gábor hojtsy’s picture

Title: Update Symfony to 4 or 5 in Drupal 9 » Update Symfony to 4.4 in Drupal 9.0
Issue summary: View changes

Updating title.

gábor hojtsy’s picture

Status: Active » Postponed
pasqualle’s picture

Does it mean
1. Drupal will adopt only Symfony LTS releases?
2. New Drupal major version will be released with every new Symfony LTS release (like every 2 years)? Because there are no more than 2 Symfony LTS releases supported at the same time.
https://symfony.com/roadmap#maintained-symfony-branches

gábor hojtsy’s picture

@Pasqualle: unless (a) Symfony changes their policy on this again or (b) Drupal becomes more decoupled from Symfony in future versions, Drupal would need to release only on LTS versions yeah if we want to keep the 12 month support cycle. Symfony LTS releases are supported for 4 years (https://symfony.com/roadmap/4.4), so I don't believe core would need to release every 2 years, it could release every 3-3.5 depending on when it releases.

pasqualle’s picture

release every 3-3.5

That does not match my calculation.

for example if D10 would be released in 2023,

Where S4LTS will be almost eol, and S5LTS will have less than 2 years.
That would mean D10 will live less than 2 years or D10 must be updated to S6LTS in its lifetime.

It is not possible to wait for S6LTS for D10, because then D9 would run on unsupported S4LTS or D9 must be updated to S5LTS in its lifetime.

I should have draw a graph based on Symfony releases to be more clear here, but I hope you get my explanation.

gábor hojtsy’s picture

@Pasqualle well, you derive the periods from your assumed Drupal 10 release date of 2023 which may or may not be true.

pasqualle’s picture

StatusFileSize
new10.13 KB
new6.32 KB

Ok, here is the graph explaining why every 2 years:

gábor hojtsy’s picture

Right, as I said that assumes we wait over half a year to adopt the next LTS, which is not at all a given. One of the many things we can do is to make Drupal 9 shorter so Drupal 10 onwards can be longer.

pasqualle’s picture

The release can be even 4 years long but the release schedule still must be 2-2,5 years between releases, as we have to match Symfony's release cycle, because with our current support rules can not skip a Symfony LTS.

gábor hojtsy’s picture

@Pasqualle: A Symfony LTS is security supported for 4 years after its release. Assuming Drupal would release a month after the Symfony LTS (eg. November release for Symfony LTS and December release for Drupal), it would be 3 years and 11 months before Drupal needs to end support. Your D9/D10/D11 boxes start significantly after the Symfony support starts and they end significantly before it ends, neither is a necessity. As a matter of fact, Drupal 8 support end is already tied to Symfony 3 support end. (The end of the Symfony 3 yellow box on your figure). That is where your math does not match reality.

gábor hojtsy’s picture

I had a private conversation with @Pasqualle. He mixed time between releases (as he originally asked in #5) and support length (as he explained in #7). The two are not the same. That said, I still misread what he wrote in #5, sorry for that.

If nothing else changes, then indeed Drupal would need to release roughly every 2 years but could still be supported for 4 years if the major releases are timed with Symfony's LTS. (@Pasqualle's blue rectangles do not reflect this and end support sooner than needed). That said, there are a lot of possibilities that this will not be the case:

  1. Symfony just changed their policy 19 days ago (https://symfony.com/blog/symfony-maintenance-changes-for-standard-releases). They may change it again in the future (maybe even before Drupal 9).
  2. Drupal 9 could introduce abstraction layers and be more decoupled from Symfony (there are already issues around this, eg. #2917331: Decouple from Symfony CMF and #3054535: Discuss whether to decouple from Symfony Validator, which would allow to even update between LTS versions in Drupal 10 and going forward.
  3. Drupal 8 introduced 12 month support for minor releases because minor releases turned out to be more disruptive then we hoped. If we can prove that is not the case anymore, Drupal *could* reduce the support length again in which case 8 months may suffice.
  4. There are probably various other scenarios that I cannot think of right now :)

So future looking statements are very hard to make about this at this time.

chi’s picture

That's kind of frustrating that Drupal 9 will use outdated Symfony version from the beginning. Can we apply major Symfony update within Drupal 9 life cycle? We already did it in Drupal 8. Symfony does very good job at preserving backwards compatibility even between major releases. We could support two major Symfony versions so that projects that use Symfony API directly could stick to lower Symfony version by setting an appropriate constraint in composer.json.

gábor hojtsy’s picture

@Chi: releasing on Symfony 5 would on the other hand mean a lot more disruptive changes (just check all the suppressed deprecations in #2976394: Allow Symfony 4.4 to be installed in Drupal 8). Pretty good backwards compatibility is not really what is happening between Symfony 4 and 5. #13/2 explains a way to allow for future Symfony updates under Drupal. Not sure if that is possible within Drupal 9.

pasqualle’s picture

Based on the slack chat, Drupal 9 will be Symfony 5 compatible (maybe even from 9.0 alpha release).

I do not know if there is a plan for "official" support for 2 major Symfony versions.

Version: 9.x-dev » 9.0.x-dev

The 9.0.x branch will open for development soon, and the placeholder 9.x branch should no longer be used. Only issues that require a new major version should be filed against 9.0.x (for example, removing deprecated code or updating dependency major versions). New developments and disruptive changes that are allowed in a minor version should be filed against 8.9.x, and significant new features will be moved to 9.1.x at committer discretion. For more information see the Allowed changes during the Drupal 8 and 9 release cycles and the Drupal 9.0.0 release plan.

mikelutz’s picture

Status: Postponed » Closed (duplicate)

Closing as a duplicate of #3088369: Update Drupal 9 to Symfony 4.4-dev and transferring credit

mikelutz’s picture

Based on the slack chat, Drupal 9 will be Symfony 5 compatible (maybe even from 9.0 alpha release).

Definitely not from the alpha release, SF 5.0 will not even be out then. We may have 5.0 or 5.1 compatibility at the time of D9 release, depending on what we decide about how to do deprecations in 8.9/9.0

Symfony minor release tend to break stuff, so keeping compatible with 5 will be a moving target, but that is the goal, similar to how we kept drupal mostly compatible with SF4 during the lifecycle.

Mixologic’s picture

If Im not mistaken, this is a duplicate of #3088369: Update Drupal 9 to Symfony 4.4-dev

Mixologic’s picture

ah. cross post.