21torr/janus
Janus PHP provides shared configuration for CI and PHP code style tools, making it easy to standardize linting, formatting, and automation across projects. Includes ready-to-use presets and documentation for quick setup.
Task class naming) and PHPUnit extensions demonstrate Laravel-specific static analysis, addressing gaps in generic PHPStan configs.- name: Janus Linting
run: composer janus
init-symfony → init symfony), easing migration from custom setups.phpstan.neon or php-cs-fixer.php.doctrine.columnType) may hide legitimate issues in Symfony forms. Requires manual review of suppressed checks.doctrine.columnType)?laravel-pint, custom PHPStan configs) that better fit our needs?composer.json:
"require-dev": {
"21torr/janus": "^2.1"
}
composer janus check (PHP-CS-Fixer).composer janus analyze (PHPStan) later..janus.php or override configs in phpstan.neon.doctrine.columnType if it causes false positives:
includes:
- vendor/21torr/janus/phpstan.neon
services:
phpstan.doctrine.columnType: false
.github/workflows/linting.yml:
- name: Janus
run: composer janus
"scripts": {
"post-install-cmd": ["@janus"]
}
| Component | Compatibility | Mitigation |
|---|---|---|
| Laravel Version | Requires Symfony 8+ (Laravel 9+). | Upgrade or use Janus’s Symfony 6+ configs. |
| PHPStan | v2.x (no breaking changes from v1). | Update PHPStan if using v1. |
| Doctrine | Schema validation and DQL types. | Test with existing migrations. |
| PHPUnit/Pest | PHPUnit extension may need Pest adjustments. | Disable or customize PHPUnit-specific rules. |
| Custom Rules | Override via .janus.php or config files. |
Fork if heavy customization is needed. |
composer update 21torr/janus..janus.php or config file edits.doctrine.columnType).composer janus).-v flags for PHPStan to debug errors.How can I help you explore Laravel packages today?