Problem/Motivation
The field_validation module currently has a Composer requirement for symfony/intl set to ^6.3.
This does not allow Symfony 7 and causes a dependency conflict when using field_validation:3.0.x-dev in a Drupal 11 project, because Drupal 11 uses Symfony 7 components.
This is the same kind of issue as #3525460, where another Composer dependency constraint was updated to allow compatibility with newer dependency versions.
In Drupal 11 projects, symfony/intl needs to allow ^7, but the current ^6.3 constraint prevents that.
Steps to reproduce
- Start with a Drupal 11 project.
- Require
field_validation:3.0.x-devwith Composer. - Composer fails because the current
symfony/intl:^6.3constraint fromfield_validationdoes not allow the Symfony 7 version required by Drupal 11.
Example:
composer require drupal/field_validation:3.0.x-dev
This results in a dependency conflict involving symfony/intl, because Drupal 11 requires Symfony 7 components while the module currently requires symfony/intl:^6.3.
Proposed resolution
Update the symfony/intl requirement in composer.json for the 3.0.x branch to allow Symfony 7.
For example, change the constraint from:
"symfony/intl": "^6.3"to:
"symfony/intl": "^6.3 || ^7.0"Alternatively, if the project wants to align with Drupal 10.3+ and Drupal 11 supported Symfony versions, the constraint could be adjusted as appropriate.
This should allow the module to be installed in Drupal 11 projects while preserving compatibility with Drupal 10.
Remaining tasks
- Update the
symfony/intlconstraint incomposer.json. - Verify that the module can be installed with Drupal 11.
- Run tests to confirm there are no issues with Symfony 7.
User interface changes
None.
API changes
None.
Issue fork field_validation-3622470
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
Comment #3
abhisekmazumdarComment #5
abhisekmazumdarThanks for reporting this and opening the MR, hoarauv.
The
symfony/intlconstraint hadn't been touched since it was first added in 2023, back when Drupal 10 ran on Symfony 6.3. It was never widened as Drupal moved to Symfony 7, so the fix is correct: widening it to^6.3 || ^7lets the module install on Drupal 11 without dropping Drupal 10 support.MR !30 is merged. Closing as fixed.
Comment #7
abhisekmazumdarComment #8
abhisekmazumdarComment #9
marco.pagliarulo commentedThis bug is a blocker for D11 upgrade, would be possible to have a 3.0.0-rc2 soon?
Comment #10
abhisekmazumdarDone https://www.drupal.org/project/field_validation/releases/3.0.0-rc2
Comment #11
marco.pagliarulo commentedThanks a lot