phpyh/coding-standard
Opinionated PHP coding standard for Laravel projects, built on PHP-CS-Fixer with ready-to-use rules, presets, and a simple CLI/workflow to automatically format code and keep style consistent across your team and CI.
phpyh/coding-standard package enforces PHP coding standards (likely PSR-12 or custom rules) via PHP_CodeSniffer. It is a static analysis tool, not a runtime dependency, making it ideal for pre-commit hooks, CI/CD pipelines, or developer workflows in Laravel.laravel-shift/blueprint).laravel-shift/blueprint or dealerdirect/phpcodesniffer-composer-installer).Sniff classes).phpcs.xml config.rector/rector, phpstan/phpstan) may duplicate or conflict with this package’s rules.laravel-shift/blueprint)../vendor/bin/phpcs --standard=phpyh on a sample of code to identify violations.phpstan, rector).--ignore for known legacy issues.- name: PHP Coding Standards
run: ./vendor/bin/phpcs --standard=phpyh --error-severity=5 src/
--warning-severity → escalate to --error-severity.squizlabs/php_codesniffer).dealerdirect/phpcodesniffer-composer-installer (if both manage sniffers).laravel-shift/blueprint (overlapping rules).app/, config/, etc., via --paths.<config name="installed_paths" value="./vendor/phpyh/coding-standard"/>
<arg name="extensions" value="php,blade"/>
phpstan/rector (but avoid duplicate checks).phpcs.xml.--diff flag).phpyh/coding-standard and php_codesniffer versions in composer.json.PSR12.Classes.ClassDeclaration.MissingNamespace").phpcs.xml.phpcs.xml.| Failure Type | Impact | Mitigation |
|---|---|---|
| CI Blockage | Builds fail on violations. | Gradual enforcement; exclude paths. |
| Rule Overlap | Conflicts with phpstan/rector. |
Audit rules; consolidate tools. |
| Outdated Rules | Breaks on new PHP/Laravel versions. | Pin versions; test upgrades. |
| Developer Resistance | Team ignores violations. | Educate on benefits; start with warnings. |
| Configuration Errors | Misconfigured phpcs.xml. |
Template config; peer review. |
How can I help you explore Laravel packages today?