Skip to content

docs: use attributes in controllers page #1389

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

Merged
merged 3 commits into from
Jun 23, 2021

Conversation

alanpoulain
Copy link
Member

No description provided.

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

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

+1 but maybe should we just follow Symfony's best practices (even if I don't like this one) and extends AbstractController as well as changing __invoke to another name.
It will probably make this documentation easier to understand for users used to "the Symfony way".

WDYT?

Co-authored-by: Kévin Dunglas <[email protected]>
@alanpoulain
Copy link
Member Author

+1 but maybe should we just follow Symfony's best practices (even if I don't like this one) and extends AbstractController as well as changing __invoke to another name.
It will probably make this documentation easier to understand for users used to "the Symfony way".

WDYT?

Why not for the AbstractController. I'm not so sure about changing __invoke though, we would need to reference the method name in the controller attribute and we would lose the easy way to only use the FQCN.

@alanpoulain alanpoulain merged commit 1081cb4 into api-platform:2.6 Jun 23, 2021
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.

2 participants