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

Upgrade command does not remove #[ApiSubresource] #5038

Closed
BeyerJC opened this issue Sep 30, 2022 · 2 comments
Closed

Upgrade command does not remove #[ApiSubresource] #5038

BeyerJC opened this issue Sep 30, 2022 · 2 comments

Comments

@BeyerJC
Copy link
Contributor

BeyerJC commented Sep 30, 2022

API Platform version(s) affected: 2.7.1

Description
Maybe this is intened but after running the upgrade command, a new ApiResource was added in my related entity class but the #[ApiSubresource] attribute was not removed.

How to reproduce
Create two related entities, add #[ApiSubresource] attribute and run the upgrade command.

Possible Solution
If this is not intended the command should remove the attribute after creating the new GetCollection.

@soyuka
Copy link
Member

soyuka commented Sep 30, 2022

Even by using php-cs-fixer after? Maybe we forgot something even though it's not a big deal as they won't be processed in 3.0 (or legacy flag to false).

@BeyerJC
Copy link
Contributor Author

BeyerJC commented Sep 30, 2022

No, php-cs-fixer did not remove the attribute. It did not cause any trouble besides my IDE complaining :-)

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

No branches or pull requests

2 participants