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

Operation name not overwritten #5082

Closed
Wimble84 opened this issue Oct 22, 2022 · 0 comments
Closed

Operation name not overwritten #5082

Wimble84 opened this issue Oct 22, 2022 · 0 comments
Labels

Comments

@Wimble84
Copy link

Wimble84 commented Oct 22, 2022

Symfony: 6.1.5
api-platform/core: 3.0.2

Description
Hi !

I've a Compagny entity. I need to give a name to my Get operation but if I do it like this

#[Get(
    security: "is_granted('IS_AUTHENTICATED_FULLY')",
    name: 'compagny_get',
)]

The name argument is ignored as you can see in the debug:router command
image

But if i declare my Get operation in ApiResource attribute like this

#[ApiResource(
    operations: [
        new Get(
            security: "is_granted('IS_AUTHENTICATED_FULLY')",
            name: 'compagny_get',
        )
    ]
)]

image

The operation name is correctly overwritten.

Clearing the cache does not change anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants