- What is assoconnect/php-quality-config used for?
- It is a dev-only Composer package that centralizes code-quality tooling for PHP projects: custom PHPStan rules, a shared Rector ruleset and PSR-12 PHPCS standards. It is a configuration artifact consumed by CI and local tooling, not a runtime library, so it adds no service provider, facade or config merge to your Laravel application. You install it with the --dev flag next to the quality tools you already run.
- How do I install assoconnect/php-quality-config?
- Run composer require --dev assoconnect/php-quality-config in the root of your project. Because the package requires PHP 8.5, make sure your composer.json platform constraint and your CI runner already satisfy that floor before installing. Afterwards you reference its Rector ruleset, PHPStan configuration and PHPCS standard from your own config files.
- Which PHP version does assoconnect/php-quality-config require?
- PHP 8.5 or higher is mandatory as of version 2.5.0. The previous PHP 8.4 floor was dropped and the maintainers no longer test that lane, so regressions affecting 8.4 consumers will not be caught upstream. Set your Composer platform requirement accordingly before upgrading.
- Does assoconnect/php-quality-config support Laravel 11 or Laravel 10?
- The PHP 8.5 requirement effectively limits the package to Laravel 12 and newer. Laravel 11 runs on PHP 8.2 to 8.4 and Laravel 10 on PHP 8.1 and up, so both sit below the platform floor and are out of scope unless you override the constraint. Version 2.5.0 raised that floor and removed the PHP 8.4 CI lane at the same time.
- How do I add the AssoConnect Rector ruleset to my rector.php?
- Register the packaged rules file with withSets, pointing at vendor/assoconnect/php-quality-config/src/Rector/rules.php relative to your project root. Your own Rector configuration still supplies paths, skips and any project-specific rules. Commit rector.php so local runs and CI apply exactly the same rule set.
- Which PHPStan rules does this package ship?
- It includes EnforceHttpsLinksRule, which bans insecure http: links in string scalars and PHPDoc blocks, ForbidIdenticalClassComparisonRule, which bans strict comparison of objects, and DateTimeMustNotBeUsedRule, which enforces DateTimeImmutable. It also pulls in third-party extensions such as phpstan-phpunit, strict-rules, phpstan-webmozart-assert, roave/no-floaters, shipmonk rules and thecodingmachine strict rules. The rule set is unchanged in 2.5.0; only the interpreter floor moved.
- How do I apply the PSR-12 PHPCS standard from this package?
- The package provides the PSR-12 coding standard plus SlevomatCodingStandard.Namespaces.UnusedUses. Reference those standards in your phpcs.xml so a single vendor-hosted configuration drives both pre-commit hooks and CI. If you also run Pint, keep the rule sets aligned to avoid contradictory auto-fixes.
- Should I use a ^2.x constraint or pin an exact version?
- Pin an exact version such as 2.5.0 rather than floating on ^2.x. The PHP 8.5 platform bump shipped as a minor release from 2.4.0 to 2.5.0, so a routine composer update can silently turn into an unsatisfiable platform requirement. Exact pinning keeps upgrades deliberate, reviewable and easy to roll back.
- Can I still install assoconnect/php-quality-config on PHP 8.4?
- Not officially. PHP 8.4 was dropped from the documented floor and from the maintainers CI matrix in 2.5.0, so nothing is tested there anymore. You may be able to force an install with --ignore-platform-reqs, but you would be running unsupported tooling with no upstream regression coverage, which is rarely worth the risk on a shared CI pipeline.
- Do I still need to install PHPStan, Rector, PHPCS and PHPUnit separately?
- Yes. The package bundles rule definitions and standards, not the underlying executables, so PHPStan, Rector, PHPCS and PHPUnit stay in your own dev dependencies. Watch for version conflicts between the bundled tool pins and any globally installed binaries in your Docker image or CI runner, since a mismatch changes which rules actually execute.