-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
chore(twig): leverage twig-cs-fixer
#60761
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
base: 7.4
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should have a GitHub Actions workflow running the tool in CI, otherwise it won't be enforced.
regarding your summary in the description, this is not a new feature. It is about tooling for contributors and CI, but it does not bring any new feature in Symfony (and does not require a mention in changelog either, as users of Symfony won't care)
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig
Show resolved
Hide resolved
totally agree,
top make sens, lets not add it and update the desc |
src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig
Outdated
Show resolved
Hide resolved
ff2c8ef
to
7a755a8
Compare
i do think I've addressed the comments (standard to chose, exclude fixtures, and composer min) for the adding ci, I am not so aware of best practice of it (when no vendor lock) so please review appreciated |
f03c7a8
to
5559cb7
Compare
twig-cs-fixer
twig-cs-fixer
…nglet) This PR was merged into the 3.x branch. Discussion ---------- Coding standard suggestion about empty content Hi `@fabpot` As suggested by `@stof` symfony/symfony#60761 (comment) This would allow writing `{#--#}` rather than `{#- -#}` when following the twig coding standard. Commits ------- 0b93a1f Stof suggestion about empty content
PR updated to use latest version |
src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
Outdated
Show resolved
Hide resolved
- name: Checkout target branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.base_ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Checkout target branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Checkout | |
uses: actions/checkout@v4 |
Please note that in this case a PR branch is required, not a target branch.
This PR adds config file for the tool
twig-cs-fixer
(via)As per the original issue, this tool is, in my opinion, relevant here to standardize symfony source Twig file,
It follows Twig recommandation, and it's since the issue creation mentioned in the official Twig doc.
How to use:
twig-cs-fixer
via https://github.com/VincentLanglet/Twig-CS-Fixer (I've usedv3.8.1
now){twig-cs-fixer} --config=.twig-cs-fixer.dist.php lint --fix
TODOs:
Friendly ping @VincentLanglet @smnandre as issue commenters