endroid/quality
Quality-related helper package by Endroid for PHP/Laravel apps, providing small utilities for enforcing or improving code/data quality in your project. Suitable as a lightweight dependency when you need simple quality checks or supporting components.
This package is not a runtime validation library—it’s a configuration aggregator for PHP quality tools (PHPUnit, PHPStan, PHP-CS-Fixer, Psalm). In Laravel, it’s only relevant if you’re building library packages (e.g., a Composer package published to Packagist), not for typical app development. To start:
composer require --dev endroid/qualitycp vendor/endroid/quality/phpunit.xml.dist .
cp vendor/endroid/quality/phpstan.neon.dist .
cp vendor/endroid/quality/.php_cs.dist .
cp vendor/endroid/quality/psalm.xml.dist .
phpunit.xml.dist (e.g., <directory suffix="Test.php">src/Tests</directory>) to match your test structure.vendor/bin/phpunit—it should pick up the config and execute tests with sane defaults (e.g., code coverage, testdox output).app/, routes/, app/Http/Controllers). Laravel apps should rely on phpunit.xml generated by laravel new or Pest.phpstan.neon: includes: ['vendor/endroid/quality/phpstan.neon.dist'].php_cs.dist: $finder = $finder->in(['src', 'tests'])->name('*.php'); (then chain your own rules)endroid/quality:^4.0) to avoid breaking changes.⚠️ No runtime impact: This package does not validate input in your app (contrary to its vague description). It solely configures static analysis and testing tools.
⚠️ Version drift risk: Its config templates often lag behind tool releases (e.g., Psalm 5 configs when Psalm 6 is current). Check composer show endroid/quality for the last release date before updating.
⚠️ Laravel app conflict: Installing this in a Laravel app will overwrite your default phpunit.xml—which uses Orchestra/Testbench or Pest by default. You’ll break php artisan test.
💡 Fix config conflicts: If PHPStan errors complain about missing parameters.phpstan.neon, create it and import the preset via imports: [{resource: 'vendor/endroid/quality/phpstan.neon.dist'}].
💡 Combine with Pest: For libraries using Pest, keep endroid/quality for static analysis (PHPStan/PSalm/PHP-CS-Fixer) and configure phpunit.xml to use Pest via <phpunit bootstrap="vendor/pestphp/pest/bin/pest">.
💡 Audit tool versions: Run composer show -i | grep -E "(phpunit|phpstan|psalm|php-cs)" to verify compatible tool versions before relying on its config.
How can I help you explore Laravel packages today?