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

Symfony #[Route] Formatting Bug #2360

Open
TomoyaHamasaki opened this issue May 14, 2024 · 1 comment
Open

Symfony #[Route] Formatting Bug #2360

TomoyaHamasaki opened this issue May 14, 2024 · 1 comment

Comments

@TomoyaHamasaki
Copy link

TomoyaHamasaki commented May 14, 2024

The formatting of #[Route] lines are broken, I think. It tends to spread out over multiple lines when it could neatly fit into just one.

Input

#[Route('route/path', name: 'very_very_very_very_very_very_long_route_name', methods: ['GET'])]

Output

#[
    Route('
        'route/path',
        name: 'very_very_very_very_very_very_long_route_name',
        methods: ['GET']
    )
]
@TomoyaHamasaki TomoyaHamasaki changed the title Breaks #[Route] lines in Symfony #[Route] lines in Symfony Format Bug May 15, 2024
@TomoyaHamasaki TomoyaHamasaki changed the title #[Route] lines in Symfony Format Bug Symfony #[Route] Formatting Bug May 15, 2024
@cseufert
Copy link
Collaborator

cseufert commented Jun 11, 2024

Following PER CS 2.0 we should never have a line break after #[ and before the closing ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants