Laravel Pint v1.0 Released

Jul, 15 2022#releases

As you may have noticed a few weeks ago, we've open-sourced our latest package - Laravel Pint: an opinionated PHP code style fixer for minimalists. Pint is built on top of PHP-CS-Fixer and makes it simple to ensure that your code style stays clean and consistent.

After a few beta releases, today we've finally reached the first stable release of Pint. And, starting with next week's release of Laravel, Pint will be included on every new Laravel application as a dev dependency.

Of course, you can still use Pint on existing PHP projects by using Composer to install Pint:

composer require laravel/pint --dev

Once Pint has been installed, the pint binary will be available in your project's vendor/bin directory:

./vendor/bin/pint

By default, Pint does not require any configuration and will fix code style issues in your code by following an opinionated coding style of Laravel:

image

When running Pint, it will output a list of files that have been fixed. It is possible to see the changes made in more detail using the -v option:

image

In addition, if you would like Pint to simply inspect your code for style errors without actually changing the files, you may use the --test option:

image

Be sure to check out the Pint documentation at https://github.com/laravel/pint. We hope you enjoy this new package. At Laravel, we're committed to providing you with the most robust and developer-friendly PHP experience in the world. Enjoy!

By Nuno Maduro

Software Engineer at Laravel.

Follow the RSS Feed.