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

  1. Start with a Drupal 11 project.
  2. Require field_validation:3.0.x-dev with Composer.
  3. Composer fails because the current symfony/intl:^6.3 constraint from field_validation does 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/intl constraint in composer.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.

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

hoarauv created an issue. See original summary.

abhisekmazumdar’s picture

Assigned: Unassigned » abhisekmazumdar
Status: Active » Needs review

abhisekmazumdar’s picture

Assigned: abhisekmazumdar » Unassigned
Status: Needs review » Fixed

Thanks for reporting this and opening the MR, hoarauv.

The symfony/intl constraint 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 || ^7 lets the module install on Drupal 11 without dropping Drupal 10 support.

MR !30 is merged. Closing as fixed.

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.

abhisekmazumdar’s picture

abhisekmazumdar’s picture

Category: Feature request » Bug report
marco.pagliarulo’s picture

This bug is a blocker for D11 upgrade, would be possible to have a 3.0.0-rc2 soon?

abhisekmazumdar’s picture

marco.pagliarulo’s picture

Thanks a lot