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

Add set to migrate JMS annotations to attributes #132

Merged
merged 2 commits into from
Mar 15, 2022

Conversation

Jean85
Copy link
Contributor

@Jean85 Jean85 commented Mar 15, 2022

This should solve rectorphp/rector#7052

I don't know if this needs any test.

@Jean85
Copy link
Contributor Author

Jean85 commented Mar 15, 2022

I just noticed that these rules don't work in all situations. One common case is mixed named and non-named arguments, like:

 * @JMS\AccessorOrder("custom", custom = {"id", "email"})

after applying Rector it goes:

#[JMS\AccessorOrder(custom: ['id', 'email'])]

loosing the name argument.
[EDIT] Here's the demo: https://getrector.org/demo/a542be8d-80a0-4e31-9b85-5da01e369e60

Is this an issue on Rector's side or a custom behavior from JMS?

Maybe we can ask @goetas..

@TomasVotruba
Copy link
Member

TomasVotruba commented Mar 15, 2022

I just noticed that these rules don't work in all situations. One common case is mixed named and non-named arguments, like:

That's interesting bug on Rector's side. I'll check it in standalone PR...
rectorphp/rector-src#1932

@TomasVotruba
Copy link
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit fcd5c8e into rectorphp:main Mar 15, 2022
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.

3 participants