People searching “Laravel Pint” run it with no arguments in a huge repo and then the diff is the whole framework style. Format what you changed. The tests guide is the check that the code still behaves.
TL;DR
- vendor/bin/pint —dirty formats the PHP you touched.
- It does not format Vue.
- Do not add a PHP fixer inside a Vue file.
- Do not commit
vendor/.
The fix#
vendor/bin/pint --dirty--dirty limits Pint to git’s dirty files. Commit after you have looked at the diff. Pint rewrites spacing and imports. It does not change a query’s meaning on purpose, but you still read the diff.
Vue, TypeScript, and CSS are not Pint’s job. The kit’s frontend formatter, if you have one, is a different command. Do not add a PHP fixer inside a Vue file.
What to avoid#
Gotcha
Do not commit vendor/. Pint lives there after composer install. CI can run vendor/bin/pint --test so a bad format fails the build without rewriting the branch.
FAQ#
How do I format PHP with Pint before you commit?
vendor/bin/pint --dirty formats the PHP you touched. It does not format Vue.
What goes wrong with Laravel Pint?
Many developers run it with no arguments in a huge repo and then the diff is the whole framework style. Do not add a PHP fixer inside a Vue file.



