Closed (fixed)
Project:
Drupal core
Version:
11.3.x-dev
Component:
typed data system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2025 at 14:11 UTC
Updated:
24 Nov 2025 at 19:09 UTC
Jump to comment: Most recent
Comments
Comment #2
godotislateSome of the work in MR 12291 for #3522497: Passing an $options array to constraint constructors is deprecated, use named arguments instead may be relevant.
Comment #4
longwaveTurns out the code for ValidSequenceKeysConstraint is the same as the Existence plugin in Symfony so we can just extend that instead.
Comment #5
godotislateInteresting 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
ValidSequenceKeysConstraintdoes not semantically inherit fromExistencethe wayRequiredandOptionaldo, but the code reuse convenience overrides that for me.lgtm.
Comment #6
longwaveTBH 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.
Comment #9
catchCommitted/pushed to 11.x and cherry-picked to 11.3.x, thanks!