News

Run Laravel Pint Faster in Parallel Mode

Published
Run Laravel Pint Faster in Parallel Mode image

Laravel Pint was recently updated with a --parallel flag, making Pint 40x faster and "fully leverage the parallel capabilities of php cs fixer." You can use it like so:

vendor/bin/pint --parallel
 
vendor/bin/pint --help
...
--parallel Runs the linter in parallel (Experimental)

Note: This flag is marked as "Experimental" and potentially unstable.

To access this flag, you need to update to the latest Laravel Pint version (at least v1.23.0). You can update your dependencies with Composer:

composer update laravel/pint -w

Along with the parallel flag, release v1.23.0 allows extending a pint configuration from another file. This is useful if you have an organization pint config you share across your projects, however, want to tweak a few settings on a per-project basis:

{
"extend": "./base.json",
"preset": "laravel",
"rules": {
"declare_strict_types": true,
"lowercase_keywords": true,
"lowercase_static_reference": true,
"final_class": true,
"fully_qualified_strict_types": false,
"global_namespace_import": {
"import_functions": true
}
}
}

I am not certain if this feature is considered stable (it is not yet documented)—see Pull Request #373 for implementation details and discussion.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

acquaintsoft logo
Acquaint Softtech

Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

Visit Acquaint Softtech

The latest

View all →
A simple form builder that stays out of your way image

A simple form builder that stays out of your way

Read article
Laravel AI: Trace Agent Runs With Lifecycle Events image

Laravel AI: Trace Agent Runs With Lifecycle Events

Read article
Laravel AI: Get Raw HTTP Responses and Rate Limits image

Laravel AI: Get Raw HTTP Responses and Rate Limits

Read article
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article
Statamic Mailables Viewer Previews Laravel Emails in the Control Panel image

Statamic Mailables Viewer Previews Laravel Emails in the Control Panel

Read article