frontend
frontend copied to clipboard
Using Twig CS fixer
This feature is mostly forgotten since it was implemented. We should promote this internally so that our developers start using it on a daily basis.
Before each commit, we should validate Twig files (inside the src
directory - @bidi47 correct me if I'm wrong on this one) using this command:
composer twig-cs-check
which will output any coding style error that needs to be fixed.
Then we can fix them manually or using this command
composer twig-cs-fix
Both Composer commands are defined in composer.json.
We should also investigate if this feature can be turned into a CI tool that runs on each push - that way even if we forget to run it locally, invalid code will not get through to the default branch.