10000 Add `#[As-prefix]` to service attributes by nicolas-grekas · Pull Request #40556 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add #[As-prefix] to service attributes #40556

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 1 commit into from
Mar 23, 2021

Conversation

nicolas-grekas
Copy link
Member
@nicolas-grekas nicolas-grekas commented Mar 23, 2021
Q A
Branch? 5.x
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

This PR renames all attributes that are related to autoconfiguration with the As prefix, as I proposed several times already.

This should help autocompletion, and it's required to not collide with existing class names (eg the Command class, but also the old Controller class, etc.)

I think this As prefix is a convention for the better.

@chalasr
Copy link
Member
chalasr commented Mar 23, 2021

Should we rename #[Route]? see discussion in #40555

Copy link
Member
@jderusse jderusse left a comment

Choose a reason for hiding this comment

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

👍 for prefixing these attributes

@nicolas-grekas nicolas-grekas merged commit 45b53fe into symfony:5.x Mar 23, 2021
@nicolas-grekas nicolas-grekas deleted the as-attributes branch March 25, 2021 18:17
weaverryan added a commit to symfony/maker-bundle that referenced this pull request Apr 9, 2021
This PR was merged into the 1.0-dev branch.

Discussion
----------

[make:command] lets use attributes if possible

Console command attribute class renamed from `ConsoleCommand` => `AsCommand` symfony/symfony#40556

closes #820

Commits
-------

95eafee lets use attributes in commands if possible
@fabpot fabpot mentioned this pull request Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0