Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(symfony): fix property restrictions for root resource with dynamic validation groups #6907

Conversation

c1tru55
Copy link
Contributor

@c1tru55 c1tru55 commented Jan 10, 2025

Q A
Branch? 4.1
Tickets Closes #..., closes #...
License MIT
Doc PR api-platform/docs#...
#[ApiResource(
    validationContext: [
        'groups' => [self::class, 'getValidationGroups'],
    ],
)]
class Foo

If root resource has dynamic validation groups - validation groups for it in ValidatorPropertyMetadataFactory are evaluated as plain array ['\App\Entity\Fee', 'getValidationGroups'] and as a result no constraint is found for these validation groups.

@c1tru55 c1tru55 changed the base branch from main to 4.1 January 10, 2025 10:58
@c1tru55 c1tru55 closed this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant