- Issue created by @kunal.sachdev
- Merge request !8784#3461720 : Remove the custom groups restriction → (Open) created by kunal.sachdev
- Status changed to Needs review
9 months ago 8:34am 16 July 2024 - Status changed to RTBC
9 months ago 6:27pm 20 July 2024 - 🇨🇭Switzerland znerol
Given the info from #2820364-77: Entity + Field + Property validation constraints are processed in the incorrect order → , I'd be quite surprised if removing the
LogicException
would be sufficient to support composite validators. - Status changed to Needs work
8 months ago 9:29pm 14 August 2024 - 🇬🇧United Kingdom longwave UK
If we're going to do this it would be good to have some test coverage to prove that it does work (or indeed, as #6 implies, doesn't work).
- First commit to issue fork.
- 🇳🇱Netherlands bbrala Netherlands
Tests are indeed needed, this one would be nice though to have. Commenting to put on my list. Think tests will not be very complicated here.
- 🇳🇱Netherlands bbrala Netherlands
I found a way to support the AtLeastOneOf constraint without any changes to groups. This enables some fun stuff, like:
constraints: AtLeastOneOf: constraints: - PluginExists: manager: plugin.manager.menu.link interface: 'Drupal\Core\Menu\MenuLinkInterface' - IdenticalTo: value: ''
Which is awesome and will help in other validation issues to support vlaidation without the need to make a lot of incompatible changes to migrate to needs null etc.
I think this is ready to get a proper review. :)
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
I reviewed this, looks perfect to me.
Test coverage is great.I wanted to create an issue for supporting all composite symfony constraints without having to reimplement them, but never got to it.
The good thing is that we ever end up doing it, this should be easily replaceable with that.
For consistency and DX, we should implement all of them. Maybe we need sibling issues for each of the Composites inSymfony\Component\Validator\Constraints
?I'm setting this to RTBC meanwhile.
- 🇳🇱Netherlands bbrala Netherlands
Not sure this is good, while writing tests for 🐛 PDF files being downloaded RTBC i noted using these tests ends in an error where it thinks the constraint name is an array key. This means in on of the two something is weird i think. Setting abck to NW until i can investigate.
- 🇳🇱Netherlands bbrala Netherlands
Conclusion, it seems all good. SOrry for the confusion.