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

Mo4 Coding Standard Laravel Package

mayflower/mo4-coding-standard

PHP_CodeSniffer ruleset for the MO4 coding standard. Extends Symfony’s standard with extra sniffs for array formatting (alignment, multiline rules), property docblocks (@var), and lexicographically sorted use statements (configurable ordering).

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enforce consistency in PHP/Laravel codebases: Aligns with Symfony’s coding standards while adding MO4-specific rules (e.g., array formatting, use statement ordering, string interpolation). Reduces cognitive load for developers by standardizing style.
  • Accelerate onboarding: New developers can quickly adapt to project conventions, reducing time spent debating formatting.
  • Automate code quality: Integrates with CI/CD pipelines (e.g., GitHub Actions) to block non-compliant PRs, improving maintainability.
  • Build vs. buy: Avoids reinventing a custom ruleset; leverages battle-tested Symfony/Slevomat standards with MO4 extensions.
  • Use cases:
    • Laravel monorepos with multiple teams.
    • Projects adopting Symfony-like conventions (e.g., Doctrine, API Platform).
    • Teams prioritizing readability over strict PSR compliance (e.g., omitting class docblocks).

When to Consider This Package

  • Adopt if:
    • Your team uses Symfony, Laravel, or Doctrine and values consistency.
    • You’re migrating from PSR-12 or need stricter formatting (e.g., array alignment, use statement ordering).
    • You want auto-fixable rules (e.g., phpcbf for 80% of violations).
    • Your codebase is PHP 8.1+ (minimum requirement).
  • Look elsewhere if:
    • You need PSR-12 strict compliance (this omits some PSR rules, like class docblocks).
    • Your team prefers custom rules (e.g., unique business logic formatting).
    • You’re not using PHP_CodeSniffer (alternatives: PHPStan, Psalm, or custom ESLint).
    • Your project is pre-PHP 7.2 (minimum PHP version).

How to Pitch It (Stakeholders)

For Executives: "This package standardizes our PHP/Laravel codebase using Symfony’s proven conventions, reducing technical debt and onboarding time. It automates 80% of formatting fixes via CI, letting devs focus on features—not style debates. Low maintenance (MIT-licensed, actively updated) and integrates seamlessly with our existing toolchain."

For Engineering: "MO4 Coding Standard extends Symfony’s rules with Laravel-friendly additions (e.g., array alignment, use statement sorting). Most violations auto-fix with phpcbf, and it’s configurable—we can tweak use-statement ordering or disable rules like class docblocks. Lightweight (~17 stars but backed by Mayflower’s infrastructure)."

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport