laminas/laminas-coding-standard
Provides Laminas PHP coding standard rules and tooling to enforce consistent code style and quality across projects, integrating with CI to automate checks and help teams follow Laminas conventions.
Start by installing via Composer: composer require --dev laminas/laminas-coding-standard. Once installed, PHPCS will automatically register the Laminas standard (no manual config needed). Run ./vendor/bin/phpcs on your codebase to see violations. The first use case is typically running a one-time check on an existing project to identify style violations, then adding phpcs to local pre-commit hooks or CI (e.g., GitHub Actions) for automated enforcement. Check vendor/laminas/laminas-coding-standard/Laminas/ruleset.xml for the default sniff list and configuration.
phpcs.xml in your project root to extend Laminas and customize rules (e.g., exclude vendor, set paths, adjust severity).
<?xml version="1.0"?>
<ruleset name="MyProject">
<rule ref="Laminas"/>
<file>src</file>
<exclude-pattern>*/migrations/*</exclude-pattern>
</ruleset>
./vendor/bin/phpcs --error-severity=5 --warning-severity=5 in your pipeline to fail on errors/warnings.Laminas standard for live feedback.Laminas_Sniffs_* classes to add project-specific rules (e.g., enforcing database query conventions).<rule ref="PSR12"/> and <exclude name="Laminas..."/> where needed.squizlabs/php_codesniffer ≥3.7. Use phpcs --version and composer show laminas/laminas-coding-standard to verify. Older PHPCS versions may misinterpret rule exclusions.<exclude name="..."/> selectively or override with custom sniffs.Laminas includes PSR12), which can cause conflicting messages. Use phpcs -i to list installed standards and confirm Laminas is registered.phpcs --parallel=8 or splitting into chunks. Monitor CI time—add caching for PHPCS (e.g., vendor/ cache key).--report-diff to auto-fix what’s safe, then manually fix remaining issues. Use --report-summary to quantify violations before/after.How can I help you explore Laravel packages today?