Problem/Motivation

As per the title, constraints must use named arguments instead of options arrays.

Steps to reproduce

Proposed resolution

Convert calls to constraint constructors.
Figure out if we need to provide backward compatibility or custom deprecations for contrib.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3555533

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

longwave created an issue. See original summary.

godotislate’s picture

longwave’s picture

Status: Active » Needs review

Turns out the code for ValidSequenceKeysConstraint is the same as the Existence plugin in Symfony so we can just extend that instead.

godotislate’s picture

Status: Needs review » Reviewed & tested by the community

Interesting that Existence doesn't have the HasNamedArguments attribute, but seems to work here all the same since ContainerFactoryPluginInterface classes are instantiated differently. I have vague concerns that ValidSequenceKeysConstraint does not semantically inherit from Existence the way Required and Optional do, but the code reuse convenience overrides that for me.

lgtm.

longwave’s picture

TBH I looked at Required and Optional and given they contain no code at all I don't see how they work, but there must be special support for them somewhere, so Existence seemed to be the cleaner option to extend from.

  • catch committed cf5d4462 on 11.x
    Issue #3555533 by longwave, godotislate: Since symfony/validator 7.4:...

  • catch committed 95faba85 on 11.3.x
    Issue #3555533 by longwave, godotislate: Since symfony/validator 7.4:...
catch’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 11.3.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.

Status: Fixed » Closed (fixed)

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