Series: Every Laravel Project Should Have These Building Blocks
Part: 25 of 35 · Level: Intermediate · Prerequisites: GitHub Actions CI
Short answer: Pint fixes code style, Rector rewrites outdated code, and Larastan finds bugs without running your code. Run them in this order: Rector → Pint → Larastan . Rector changes code, Pint formats what Rector wrote, and Larastan checks the final result. Copy the three configs below, install the pre-commit hook, and run composer quality before every push.
What You’ll Learn
What Larastan, Rector and Pint each do
How to configure each tool for a real Laravel project
How to add them to an existing codebase without drowning in errors
The pre-commit hook that runs them automatically
The composer scripts and CI check that keep everyone honest
The Three Tools and What They Do
These three tools are the quality pipeline every project in this series runs:
Tool What It Does When to Run
Pint Auto-formats PHP code using the Laravel preset (built on PSR-12) Every commit…