sirbrillig/phpcs-import-detection
PHPCS sniffs that warn when classes/functions/constants are used without an explicit import or fully-qualified name, and flags unused imports. Helps catch namespace issues during refactors (note: PHP 8 tokenization bug/performance caveats).
Architecture fit: The package remains a PHPCS sniff, maintaining perfect alignment with Laravel’s static analysis tooling (e.g., laravel/pint, squizlabs/php_codesniffer). It operates as a standalone linting layer without architectural disruption, though its compatibility with newer PHPCS versions is now explicitly confirmed as broken (see Technical risk).
Integration feasibility: Still high for basic use, but critical caveats remain:
static analysis Composer keyword suggests minimal effort to discover the package, but no official Packagist entry means manual installation is still required.Technical risk: Critical (unchanged, but now with explicit confirmation of limitations):
Key questions:
Stack fit: Native to Laravel’s PHPCS ecosystem, but now explicitly incompatible with modern PHPCS versions (4.x+). Works alongside laravel/pint or phpcs CLI, but only if PHPCS ≤3.x is enforced—a non-starter for most Laravel 10+ projects (which default to PHPCS 4.x).
Migration path:
composer require phpcs/phpcs:^3.7).
phpcs.xml ruleset:
<rule ref="Vendor\SniffName"/>
squizlabs/php_codesniffer or community) is identified.Compatibility:
Sequencing:
phpcs --version).composer.json (manual) and phpcs.xml.Maintenance:
Support:
Scaling:
Failure modes:
Ramp-up:
phpstan/phpstan).How can I help you explore Laravel packages today?