Prepared configuration for Ibexa Annotation to Attribute Constraints#45
Open
Prepared configuration for Ibexa Annotation to Attribute Constraints#45
Conversation
konradoboza
approved these changes
Jan 14, 2026
src/lib/Configuration/AnnotationToAttributeConfigurationBuilder.php
Outdated
Show resolved
Hide resolved
stubs/Ibexa/Payment/Validation/Constraints/UniquePaymentMethodIdentifier.php
Outdated
Show resolved
Hide resolved
stubs/Ibexa/Segmentation/Validation/Constraint/UserToSegmentAssignment.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Konrad Oboza <konrad.oboza@ibexa.co>
Co-authored-by: Konrad Oboza <konrad.oboza@ibexa.co>
Steveb-p
reviewed
Jan 15, 2026
| ); | ||
| $rectorConfig->ruleWithConfiguration( | ||
| AnnotationToAttributeRector::class, | ||
| iterator_to_array((new AnnotationToAttributeConfigurationBuilder())->build()) |
Contributor
There was a problem hiding this comment.
Well, that kinda sucks.
How about we enable other attributes though? From Symfony Validator, routing, etc.?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related PRs:
Description:
This is a follow up to a merge-up issue where I forgot to refactor Symfony <=5 constraint annotations to Symfony 7 constraint attributes.
The main drawback of the existing rector is that it's an allow-list-based, meaning each specific constraint needs to be configured manually. So this will not protect us from a case where a new custom constraint annotation is added in 4.6, if we forgot to add it to the list here. We should rather consider writing our own rector that would:
For now, the proposed changes protect from regressions when using existing Ibexa constraints. I've extracted that list to an
IbexaSymfonyConstraintListenum.