- Can I use enabel/coding-standard-bundle in a Laravel application?
- No. This is a Symfony bundle that requires Symfony 7.0+ and wires Symfony-specific tooling such as the container and service linters plus the Symfony, Doctrine and Twig rule sets for PHPStan and Rector. Laravel ships its own conventions and ecosystem tools, so there is nothing here that integrates into a Laravel app. Laravel developers can still read the repository as a reference for structuring their own PHP-CS-Fixer, PHPStan and Rector configuration.
- How do I install enabel/coding-standard-bundle?
- Install it with Composer as a development dependency using composer require --dev enabel/coding-standard-bundle. You need PHP 8.2+ (implied by Symfony 7), Composer 2 and a Symfony 7.0+ application. Then register the bundle in your dev and test environments and wire the provided configuration files as described in the docs/index.md file in the repository. Optionally copy the Makefile and Docker composition if you want the bundled local environment.
- What tools and linters does the bundle include?
- It bundles opinionated configuration for PHP-CS-Fixer (PSR-12 plus Symfony rules), PHPStan with the Symfony, Doctrine and PHPUnit extensions, and Rector with Symfony, Doctrine, PHPUnit and Twig sets. It also adds a linter suite covering Twig templates, YAML files, the Symfony container, Symfony services, Doctrine mappings and Composer metadata. A Makefile and a Docker composition for MySQL, Redis and Mailcatcher round out the developer experience layer.
- Which PHP and Symfony versions does enabel/coding-standard-bundle support?
- The current release targets Symfony 7.0+ and, by extension, PHP 8.2 or newer. The project follows Semantic Versioning, so breaking changes should land in major releases. Check the CHANGELOG and composer.json constraints before adopting it in a project pinned to an older Symfony branch.
- Should I install it as a dev dependency only, and does it affect production?
- Yes, install it in require-dev and register the bundle only in your dev and test environments. It provides no runtime capability, only quality gates and local tooling, so shipping it to production adds weight without benefit. Keeping it out of production also avoids pulling PHPStan, Rector and linter packages into your deployed artifact.
- How do I run the coding standard and static analysis checks?
- The repository documents Composer script shortcuts: composer csf for the code style check, composer stan for static analysis and composer test for the test suite. The provided Makefile wraps the same quality gate targets, and your CI pipeline can call whichever entry point you prefer. Running these locally before committing keeps results consistent with what CI reports.
- Can I override PHPStan levels or PHP-CS-Fixer rules locally?
- Technically yes; Symfony bundles and the underlying tools allow per-project overrides on top of the shipped configuration. In practice every override erodes the main benefit of the bundle, which is a single shared standard across services. Decide up front which deviations your team will tolerate, and document them so they do not silently accumulate.
- Will it conflict with the PHPStan, Rector or PHP-CS-Fixer versions already in my project?
- There is a real risk. The bundle constrains major versions of PHPStan, Rector, PHP-CS-Fixer and the Symfony linters, and those tools ship breaking majors frequently. If the bundle release cadence lags, a project may be blocked from upgrading a tool independently. Review the Composer constraints before adopting, and confirm you can override them without forking.
- The bundled Docker setup assumes MySQL, Redis and Mailcatcher. What if my project uses PostgreSQL or a different broker?
- You only get partial value from the Docker composition in that case. The Makefile targets and quality tooling are independent of the database, so you can adopt them while ignoring or replacing the docker-compose file. Many teams treat the Docker setup purely as documentation for a reference local environment.
- Is enabel/coding-standard-bundle actively maintained, and what are the alternatives?
- It is maintained by a single organization with zero dependents and a low star count, which suggests a vendor-internal standard published publicly rather than a battle-tested community artifact. There is no published SLA or support model, though the MIT license lets you fork it if the upstream goes quiet. Alternatives include rolling your own PHP-CS-Fixer, PHPStan and Rector configs, using a similar shared coding-standard Composer package, or, for Laravel projects, Laravel Pint with Larastan.