Problem/Motivation

Drupal 12.0 should require Symfony 8.2, but it is not yet available.

Proposed resolution

  • Update to Symfony 8.2.0-BETA1 as soon as it is available.
  • Temporarily reduce the required minimum stability to allow this beta.

Remaining tasks

Waiting on upstream.

API changes

TBD

Data model changes

TBD

Release notes snippet

Symfony has been updated to v8.2.0-BETA1. It will be updated again to the stable v8.2.0 release prior to the release of Drupal 12.0.0.

Issue fork drupal-3634655

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

xjm created an issue. See original summary.

xjm’s picture

Issue summary: View changes
xjm’s picture

xjm’s picture

Issue tags: +beta target, +RC blocker
xjm’s picture

Status: Postponed » Active

godotislate made their first commit to this issue’s fork.

xjm’s picture

Don't we need the minimum-stability stunt for that one test or has it been made obsolete? I guess we'll see. :)

xjm’s picture

Status: Active » Needs work

Looks like we have some new deprecations for:

1) /builds/vendor/symfony/error-handler/DebugClassLoader.php:391
    The "Drupal\Core\DependencyInjection\ContainerBuilder::reset()" method will require a new "bool $shutdown" argument in the next major version of its parent class "Symfony\Component\DependencyInjection\Container", not defining it is deprecated.
    

(and similar).

xjm’s picture

Also this from phpstan:

---------------------------------------------------------------------- 
  Line   core/modules/ckeditor5/src/Plugin/Validation/Constraint/FundamentalCo  
         mpatibilityConstraintValidator.php                                     
 ------ ----------------------------------------------------------------------- 
         Ignored error pattern #^Parameter \#2 \$value of method                
         Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderI  
         nterface\:\:setParameter\(\) expects string,                           
         Drupal\\Core\\StringTranslation\\TranslatableMarkup given\.$#          
         (argument.type) in path                                                
         /builds/core/modules/ckeditor5/src/Plugin/Validation/Constraint/Funda  
         mentalCompatibilityConstraintValidator.php was not matched in          
         reported errors.                                                       
         🪪  ignore.unmatched (non-ignorable)                                   
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditing  
         RedundantTagsConstraintValidator.php                                   
 ------ ----------------------------------------------------------------------- 
         Ignored error pattern #^Parameter \#2 \$value of method                
         Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderI  
         nterface\:\:setParameter\(\) expects string,                           
         Drupal\\Core\\StringTranslation\\TranslatableMarkup given\.$#          
         (argument.type) in path                                                
         /builds/core/modules/ckeditor5/src/Plugin/Validation/Constraint/Sourc  
         eEditingRedundantTagsConstraintValidator.php was not matched in        
         reported errors.                                                       
         🪪  ignore.unmatched (non-ignorable)                                   
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensible  
         ElementConstraintValidator.php                                         
 ------ ----------------------------------------------------------------------- 
         Ignored error pattern #^Parameter \#2 \$value of method                
         Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderI  
         nterface\:\:setParameter\(\) expects string,                           
         Drupal\\Core\\StringTranslation\\TranslatableMarkup given\.$#          
         (argument.type) in path                                                
         /builds/core/modules/ckeditor5/src/Plugin/Validation/Constraint/Style  
         SensibleElementConstraintValidator.php was not matched in reported     
         errors.                                                                
         🪪  ignore.unmatched (non-ignorable)                                   
 ------ ----------------------------------------------------------------------- 
 [ERROR] Found 3 errors                                                         
godotislate’s picture

Don't we need the minimum-stability stunt for that one test or has it been made obsolete? I guess we'll see. :)

Apparently so.

Among other failing tests...

godotislate’s picture

Status: Needs work » Needs review

We're green!

godotislate’s picture

Title: Update to Symfony 8.2.0-BETA1 when it is available » Update to Symfony 8.2.0-BETA1

Fixes for the tests:

  • Symfony\Component\DependencyInjection\Container::reset() will have a $shutdown parameter in the next major, so Drupal\Core\DependencyInjection\ContainerBuilder::reset() will need updating as well. (This is a bit weird bc Symfony\Contracts\Service\ResetInterface::reset() does not have the same annotation). Anyway, added entry in deprecation ignores
  • Symfony added 308 responses to those where the cache-control headers were removed if they weren't custom, so had to update FinishResponseSubscriber accordingly
  • Symfony's Route attributed added a $firewall parameter to its constructor, so had to update the parent constructor call in the Drupal Route attribute class. I'm not sure we need to support the firewall parameter, but if we do, that probably should be in a follow up. Adding it could be a BC issue, though our policy does not cover constructor parameters, practically it gets tricky with attribute use
  • Changed minimum stability to beta
  • I think there must have some change in symfony/console or something that set the output column width. I could not reproduce the failure of core/tests/Drupal/KernelTests/Scripts/TestSiteApplicationTest.php locally, but the CI output showed that the were different line breaks in the string to be matched now, so I stripped the line breaks
longwave’s picture

Status: Needs review » Reviewed & tested by the community

This all looks good to me.

damienmckenna’s picture

For anyone interested, the list of open issues for Symfony 8.2 is at github:

https://github.com/symfony/symfony/issues?q=state%3Aopen+milestone%3A8.2

  • catch committed 18d97b14 on 12.0.x
    task: #3634655 Update to Symfony 8.2.0-BETA1
    
    By: xjm
    By: godotislate
    (...

  • catch committed 5187f0d5 on main
    task: #3634655 Update to Symfony 8.2.0-BETA1
    
    By: xjm
    By: godotislate
    
catch’s picture

Version: main » 12.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and cherry-picked to 12.0.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

godotislate’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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