![]() You may specify a different preset by providing the -preset option to Pint: Pint also supports PSR-12 and Symfony presets. This means it fixes code style issues using the opinionated coding style of Laravel, but you can change that by setting a different preset. You can use Pint for any PHP project, not just Laravel, and for other standards in addition to PSR-12.īy default, Pint uses the laravel preset. However, since it's a relatively new addition to the Laravel ecosystem, you might need to install it via Composer if you are working on an older application. Pint is automatically installed with all new Laravel applications, so you can use it out of the box. Linting tools analyze your code against a coding standard (PSR-12 is the current standard for PHP) and then apply formatting and style fixes to make it more readable and consistent with those standards. Laravel Pint is one of the recent linting tools in the Laravel ecosystem (its name is in fact a contraction of “PHP” and “lint”). You can use these tools in your local environment or hook them up to your CI/CD pipelines to automate the process and enforce the same quality standards across the team. ![]() As you get accustomed to them, you can write new rules and tailor them to your needs. Since you can start with almost no configuration, it's easy to integrate them in your workflow. For most of these tools, you can either use the default coding standard shipped with them or implement your own rules. These are some of the tools we use to keep our Laravel code clean and easy to maintain. Our top static analysis tools for PHP Laravel
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |