fig-r/psr2r-sniffer
PHP_CodeSniffer ruleset implementing PSR-2-R for PHP 8.1+ projects. Includes 190+ sniffs, supports CI, and can auto-fix many issues via phpcbf. Install with Composer and reference the bundled PSR2R ruleset in phpcs.xml.
Architecture fit is strong for Laravel projects using PHP_CodeSniffer directly (not Laravel Pint), as it extends PHP_CodeSniffer with PSR-2-R standards. However, conflicts arise with Laravel's default Pint (PHP CS Fixer-based) tooling, creating a fundamental toolchain mismatch. The package requires PHP 8.1+ which aligns with modern Laravel versions.
Integration feasibility is moderate: Composer installation is straightforward, but phpcs.xml configuration requires careful sniff selection. CI integration (GitHub Actions, etc.) is well-documented, though Blade template handling is unsupported out-of-the-box – requiring explicit exclusions or custom rules.
Technical risks include:
Key questions:
How can I help you explore Laravel packages today?