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 Laravel Package

cline/coding-standard

Opinionated PHP-CS-Fixer + Rector presets for modern PHP 8.4+ projects. Enforces strict coding standards, naming conventions, and architecture rules, with custom fixers, PHPDoc wrapping, and optional legacy tag/header rules for incremental adoption.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Standardization Across Laravel Ecosystem: Enables consistent coding standards for teams working on multiple Laravel projects, reducing onboarding time and technical debt. Aligns with Laravel’s emphasis on maintainability and modern PHP practices (PHP 8.4+).
  • Developer Productivity: Automates repetitive formatting tasks (e.g., PHPDoc wrapping, @author tag removal) to accelerate PR reviews and reduce cognitive load. Ideal for teams prioritizing developer experience (DX).
  • Legacy Modernization: Provides a structured path to migrate legacy PHP codebases to modern Laravel (e.g., PHP 8.4+) with built-in Rector presets for PHP 8.5 pipe-operator migrations.
  • Build vs. Buy Decision: Eliminates the need to design and maintain custom PHP-CS-Fixer configurations, saving engineering time and reducing configuration drift across repositories.
  • Use Cases:
    • Monorepos/Microservices: Enforces uniform standards across shared libraries.
    • Open-Source Contributions: Aligns with Laravel’s contribution guidelines for packages.
    • Security/Compliance: Ensures consistent PHPDoc formatting for auditability (e.g., @param/@return tags).
    • CI/CD Optimization: Reduces false positives in PR checks by preconfiguring rules for Laravel-specific patterns.

When to Consider This Package

  • Adopt When:
    • Your team uses Laravel/PHP 8.4+ and lacks standardized coding guidelines.
    • You need scalable, opinionated standards for multiple repositories or shared libraries.
    • Developer velocity is a priority (e.g., teams >10 engineers, high PR volume).
    • You’re migrating from legacy PHP (e.g., 7.x) to modern Laravel and need structured refactoring.
    • Your CI/CD pipeline can enforce pre-commit or PR checks (e.g., GitHub Actions).
  • Look Elsewhere If:
    • Your project uses PHP <8.4 (package requires PHP 8.4+).
    • You need highly customizable rules beyond the package’s presets (e.g., team-specific naming conventions).
    • Your team already has a mature, documented coding standard (e.g., custom ECS rules).
    • You lack CI/CD infrastructure to enforce automated checks.
    • Your codebase includes non-PHP files (e.g., Blade templates, .env) requiring custom handling.

How to Pitch It (Stakeholders)

For Executives (Business/Strategy)

*"This package standardizes our PHP codebase to Laravel’s modern best practices, reducing bugs and onboarding time. By automating formatting (e.g., docblocks, naming conventions), we’ll:

  • Cut PR review time by 30%+—engineers spend less time debating style.
  • Future-proof our code for PHP 8.4+ and Laravel’s evolving standards.
  • Scale effortlessly across repositories, ensuring consistency for teams and contractors. It’s a low-risk, high-reward investment: a one-time setup for long-term maintainability. Similar tools (like Prettier for JavaScript) are industry standards—this does the same for PHP."*

For Engineering Leaders (Tech/Operations)

*"This is a preconfigured PHP-CS-Fixer with Laravel-friendly presets (e.g., PHPDoc formatting, architecture rules). Key benefits:

  • Zero maintenance: Drop-in replacement for php-cs-fixer with minimal setup.
  • Enforces best practices:
    • Removes legacy tags (@author, @version) to reduce noise.
    • Wraps docblocks at 80 columns for readability.
    • Includes architecture-focused rules (e.g., naming conventions).
  • Scalable: Ideal for monorepos or shared libraries. Recommendation: Pilot in 1–2 repos, then enforce via CI. Pair with a deprecation timeline for legacy code (e.g., 6–12 months)."*

For Developers (Implementation)

*"This package saves hours of manual formatting and style debates. Here’s how to use it:

  1. Install:
    composer require cline/coding-standard --dev
    
  2. Run fixes:
    vendor/bin/php-cs-fixer fix --rules=@cline-standard
    
  3. Enforce in CI: Add a step to check code before merging (e.g., GitHub Actions).
  • Why it’s great:
    • PHPDoc presets: Auto-formats docblocks (e.g., @param tags) to 80 columns.
    • Architecture rules: Enforces consistent naming (e.g., snake_case for DB columns).
    • Legacy cleanup: Removes @author/@version tags by default (opt-in available).
  • Pro tip: Use --dry-run to preview changes before applying. No more arguing about spaces vs. tabs—just run the fixer and move on."*

For Security/Compliance Teams

*"This package ensures consistent PHPDoc formatting and removes legacy metadata (@author, @version), improving auditability. Key benefits:

  • Standardized documentation: Ensures @param/@return tags are formatted and present.
  • Reduced technical debt: Automates compliance with modern PHP/Laravel standards.
  • CI/CD integration: Flags non-compliant code early in the development cycle. Recommendation: Enforce as a gateway check in PR pipelines to catch issues pre-merge."*
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky