Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Jun 15, 2025

Ref #6984 (review) , single AttributeGrup result, or skip.

…petitive annotation product only single AttributeGroup
@samsonasik samsonasik changed the title [PhpAttribute] Ensure count($attributeGroups) before loop to avoid repetitive annotation product only single AttributeGroup on GenericAnnotationToAttributeConverter [PhpAttribute] Ensure count($attributeGroups) before loop to avoid repetitive annotation produce only single AttributeGroup on GenericAnnotationToAttributeConverter Jun 15, 2025
@samsonasik samsonasik changed the title [PhpAttribute] Ensure count($attributeGroups) before loop to avoid repetitive annotation produce only single AttributeGroup on GenericAnnotationToAttributeConverter [PhpAttribute] Ensure count($attributeGroups) !== 1 check before loop to avoid repetitive annotation produce only single AttributeGroup on GenericAnnotationToAttributeConverter Jun 15, 2025
@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

@samsonasik
Copy link
Member Author

Let's merge this as safe belt ;)

@samsonasik samsonasik merged commit c8bd43a into main Jun 15, 2025
45 checks passed
@samsonasik samsonasik deleted the ensure-count branch June 15, 2025 17:43
Comment on lines +90 to +92
if (count($attributeGroups) !== 1) {
return null;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hides implementation even more, let's revert.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue without this is, the loop annotation removal may invalid, as we only apply single AttributeGroup, as 1 AtrributeGroup is 1 line annotation, need loop removal become buggy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This service is only used for our internal rules with non-repeatable annotatoins. We're safe.
In case this will show buggy in the future, we'll handle it. YAGNI :)

@github-actions
Copy link
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants