Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Coding Standard

Coding Standard Laravel Package

broadway/coding-standard

Opinionated PHP_CodeSniffer rules used at Broadway to enforce consistent, modern PHP style across projects. Easy to install and run in CI to catch formatting and code quality issues early, helping teams keep codebases clean and uniform.

View on GitHub
Deep Wiki
Context7

The coding standard of the Broadway project.

Frequently asked questions about Coding Standard
How do I install broadway/coding-standard in a Laravel project?
Run `composer require --dev broadway/coding-standard` in your project root. This installs the coding standard as a dev dependency, allowing you to integrate it with PHP-CS-Fixer or Git hooks without affecting production.
Does this package work with Laravel’s default PSR-12 coding standards?
No, it enforces Broadway’s opinionated rules, which may conflict with PSR-12 (e.g., Broadway-specific naming conventions like `Event` suffixes). Use it only if your team adopts Broadway for event sourcing or explicitly needs its standards.
Can I integrate this into Laravel’s CI pipeline (GitHub Actions/GitLab CI)?
Yes. Add a step to run `vendor/bin/php-cs-fixer fix --rules=@Broadway` (or equivalent) in your CI workflow. Fail builds on violations or use `--dry-run` to warn first. Example: `run: vendor/bin/php-cs-fixer fix --rules=@Broadway --dry-run`.
Will this break existing Laravel codebases that don’t use Broadway?
Potentially. Broadway’s rules (e.g., domain-specific naming) may clash with Laravel’s conventions. Audit your codebase first or customize the rules via PHP-CS-Fixer’s config to align with your project’s needs.
How do I configure PHP-CS-Fixer to use Broadway’s rules?
Create a `.php-cs-fixer.php` file referencing the package’s template (`vendor/broadway/coding-standard/.php-cs-fixer.dist.php`) and set the finder to target your `src/` and `test/` directories. Example: `$config->setRules(['@Broadway' => true])`.
Is this package compatible with Laravel 9/10 and PHP 8.0+?
Yes, it has no direct Laravel dependencies and should work with modern PHP versions. However, test it in your environment, as Broadway’s underlying rules may assume specific PHP features or Laravel integrations.
Can I customize or extend the coding standard rules?
Yes, you can override or extend rules via PHP-CS-Fixer’s config. For example, modify the `.php-cs-fixer.dist.php` file to exclude Broadway-specific rules that conflict with your Laravel project’s conventions.
What’s the difference between this and php-cs-fixer’s PSR-12 preset?
This package enforces Broadway’s domain-driven design (DDD) conventions (e.g., event/message naming, docheader formats), while PSR-12 is generic. Use this only if you’re using Broadway or need its strict, opinionated rules.
Does this package support docheader validation (like PHPDoc standards)?
Yes, it includes a `docheader` tool. Copy the `.docheader.dist` template to your project root and run `vendor/bin/docheader check {src,test}` to validate PHPDoc compliance with Broadway’s standards.
How often is this package updated, and is it actively maintained?
The last release was in 2022, and maintenance depends on Broadway’s updates. Check the [GitHub repo](https://github.com/broadway/coding-standard) for activity. Pin the version in `composer.json` to avoid unexpected updates if stability is critical.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium