Open ahmed-bhs opened 1 hour ago
Hi, thanks for proposal.
Sounds good to me. Feel free to send the rule :+1:
The best way to start is with the docs for custom rules: https://getrector.com/documentation/custom-rule
Hi @TomasVotruba, Thank you for considering the idea. I appreciate your attention to this matter.
Here’s the plan:
Objective: Create a custom Rector class that renames all route names and paths to snake_case if they are currently in camelCase, kebab-case, or any other format.
Implementation Steps:
Class Structure:
SnakeCaseRouteRector
that extends AbstractRector
.refactor
method to iterate over the routes.Testing:
Documentation:
If you have any comments or concerns about anything, just let me know. I’m eager to hear your thoughts on this plan!
Hi Rector team,
Following the recent acceptance of the proposal to use snake_case for routes in Symfony, as detailed in this Symfony documentation pull request, I’d like to suggest adding a Rector rule that automates the refactoring of route names and paths to snake_case.
Why is this useful?
Next Steps:
Looking forward to your feedback and guidance!
Best regards,