Skip to content

Conversation

JohJohan
Copy link
Contributor

@JohJohan JohJohan commented Apr 23, 2025

From: #718

Thanks for the report. Rule is in very early stages, based on couple diffs of referenced PR, so any test fixture of the right setup will help.

Can you send a PR with the test fixture you expect?

We would need:

  1. Set support for symfony/console to 7.3 or at least define AsCommand has attribute help
  2. Write a rector rule who will move help to the attribute (and make sure this is done before InvokableCommandRector as that will remove configure in total.

@TomasVotruba
Copy link
Member

Awesome, thanks for the test fixture 👍

Could you add fix as well?

@TomasVotruba
Copy link
Member

Looks good 👍

@JohJohan
Copy link
Contributor Author

@samsonasik note i did:

  1. Added fixture to call all for CommandConfigureToAttributeRector (to check that the output will work for CommandHelpToAttributeRector and InvokableCommandRector
  2. For InvokableCommandRector i made sure we also cleanup method chaining calls (also a fixture for this)
  3. For CommandConfigureToAttributeRector added a fixture that has all attributes set from example CommandConfigureToAttributeRector rule and will add help attribute

@JohJohan JohJohan requested a review from samsonasik April 24, 2025 10:30
@samsonasik
Copy link
Member

Let's give it a try, thank you @JohJohan

@samsonasik samsonasik merged commit b3a4192 into rectorphp:main Apr 24, 2025
5 checks passed
@TomasVotruba
Copy link
Member

Thakn you @JohJohan 👏

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