- Issue created by @bbrala
- Merge request !11940feaT: add SequentiallyConstraint and childs and test if we can have our... β (Open) created by bbrala
- π³π±Netherlands bbrala Netherlands
Wow, am i dreaming. This little trick might make it possible to support those symfony constraints without weirdness.
Everything is green... It cant be that easy right?
- πΊπΈUnited States smustgrave
Left some small comments and a question
If you are another contributor eager to jump in, please allow the previous poster(s) at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
- π³π±Netherlands bbrala Netherlands
Fixed issues, but kinda need someone into validation to review this since it feels weird this works at face value. It might overlook issues.
- π³π±Netherlands bbrala Netherlands
Removing tag since committer who will review this seems to be the subsystem maintainer.
- πΊπΈUnited States smustgrave
Going to mark because I believe all feedback has been addressed on this one, thank you for adding the CR.
- π³πΏNew Zealand quietone
I did not do a code review but I left a question about the name of the constraint and then made some minor suggestions.
This should have another opinion about the name, not just mine.
- Status changed to RTBC
14 days ago 7:13pm 29 August 2025 - π³π±Netherlands bbrala Netherlands
Thanks quietone for the review. Since it was all style/wording ill set it back to RTBC
- π§πͺBelgium borisson_ Mechelen, π§πͺ
While this is great, we don't usually add new features if they don't have an immediate usecase in core. Do you know where we could be using this? Or is this just about exposing all the symfony constraints?
- π³π±Netherlands bbrala Netherlands
Valid point. As per parent Wim said he had a quite a few places where this was usefull, but he didnt say where. When i look at core i see a few places where this might be quite usefull. Few examples:
# file: block.schema.yml theme: type: string label: 'Theme' constraints: NotBlank: [] ExtensionName: [] ExtensionExists: theme
Here it could first say "Should not be blank", then if that is true "Invalid extension name", when "Extension does not exist".
This is way better than doing them all.
Same here:
# file: block.schema.yml region: type: string label: 'Region' constraints: NotBlank: [] Callback: ['\Drupal\block\Entity\Block', validateRegion]
or
# Plugin \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language ckeditor5.plugin.ckeditor5_language: type: mapping label: 'Language' constraints: FullyValidatable: ~ mapping: language_list: type: string label: 'Language list ID' constraints: # Configuring this does not make sense without the corresponding button. CKEditor5ToolbarItemDependencyConstraint: toolbarItem: textPartLanguage # Only the following values are accepted. Choice: # United Nations "official languages". - un # Drupal's predefined language list. - all # Languages configured at /admin/config/regional/language for the site. - site_configured
I think a lot of the places where more than one constraint is defined we should use this. Should we pick one or perhaps just do follow ups? What do you think.
- π§πͺBelgium borisson_ Mechelen, π§πͺ
I think a lot of the places where more than one constraint is defined we should use this. Should we pick one or perhaps just do follow ups? What do you think.
I think doing followups makes most sense here.
- π³π±Netherlands bbrala Netherlands
I've made π± [META] Update schema's with multiple contraints to SequentiallyConstraint Active to start working on those after this issue.