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

Php Code Style Laravel Package

php-parallel-lint/php-code-style

Run style checks and enforce consistent PHP code formatting as part of your CI or local workflow. Includes an easy CLI setup for scanning projects, reporting violations, and keeping codebases clean and readable with minimal configuration.

View on GitHub
Deep Wiki
Context7

Getting Started

Assuming the package in question is actually php-parallel-lint/parallel-lint (the widely used syntax checker — not php-parallel-lint/php-code-style, which does not exist as a real Composer package), start here:

  1. Install it in your Laravel project:
    composer require --dev php-parallel-lint/parallel-lint
    
  2. Run syntax checks on your codebase:
    vendor/bin/parallel-lint app tests
    
  3. First real-world use case: Add it to CI before PHPUnit to fail fast on syntax errors — it’s 3–5× faster than php -l on large projects thanks to parallelization.

Implementation Patterns

  • CI Safety Net: In GitHub Actions, run parallel-lint as a job before test suites to catch typos and parse errors:
    - name: Lint PHP syntax
      run: vendor/bin/parallel-lint app tests --no-progress
    
  • Pre-commit Hook: Integrate via lint-staged in your package.json to lint staged PHP files:
    {
      "lint-staged": {
        "*.php": ["vendor/bin/parallel-lint"]
      }
    }
    
  • Custom Exit Codes: Use --set-error-level to ignore deprecations or treat all notices as fatal:
    parallel-lint app tests --set-error-level 24575
    
  • HTML Reports (Legacy): For legacy dashboards (e.g., Jenkins), generate HTML output:
    parallel-lint app --highlight=phps > lint-report.html
    
  • Integrate with Laravel Pint: Use parallel-lint for syntax-only checks, and pint for formatting — one fast check, one formatting fix.

Gotchas and Tips

  • ⚠️ Only catches syntax errors — not style issues (no PSR-12, no naming conventions). Don’t confuse it with linters like PHP-CS-Fixer or Laravel Pint.
  • 🚫 No php-code-style package: This name is a myth. Verify your composer.json — you almost certainly want php-parallel-lint/parallel-lint.
  • 🌪️ CI output chaos: Parallel output can interleave. Use --no-progress and --colors=never for predictable CI logs.
  • 📦 Memory limits: On very large codebases (e.g., >1k files), pass --memory-limit=1G if you hit fatal OOMs — default is often too low for parallel workers.
  • 🔍 Silent failures: Very rare, but XDebug or opcache bug can interfere. Always double-check with php -l path/to/file.php if a lint “passes” but the app breaks.
  • 🛠️ Extend via PHP: You can extend its core ParallelLintApplication class for custom filtering logic (e.g., skip vendor based on composer.json autoload rules) — useful for monorepo integrations.
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