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 Cs Fixer Config Laravel Package

amphp/php-cs-fixer-config

Shared PHP-CS-Fixer configuration used across amphp projects. Install as a dev dependency, create a .php_cs.dist that returns Amp\CodeStyle\Config, configure the Finder paths and cache file, and run php-cs-fixer locally or in CI (e.g., Travis) for consistent styling.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: This package is a dev-only dependency for enforcing PHP CS Fixer rules aligned with AMP's standards. It fits well in PHP projects needing consistent code styling, especially those using AMP components. However, its AMP-specific rules (e.g., strict_types enforcement, nullable type declarations) may not align with non-AMP projects without customization. Integration is purely for development workflows, not runtime.

Integration feasibility: High for PHP 7.4+ projects using PHP CS Fixer v3.5+. Requires minimal setup (composer dependency + config file), but existing codebases will need remediation to comply with the rules. The 0 dependents metric suggests limited adoption outside AMP projects, which may indicate niche use cases or lack of community validation.

Technical risk: Low for new projects; moderate for legacy codebases with significant style violations. Key risks include:

  • PHP version mismatch (requires >=7.4)
  • Potential CI/CD pipeline failures during initial enforcement
  • Limited community support due to low dependents (0)
  • Future compatibility if AMP changes its standards (though the package is actively maintained per releases)

Key questions:

  • Does our codebase already use PHP CS Fixer? If not, what’s the effort to adopt it?
  • How many code style violations exist in our current codebase?
  • Do AMP’s specific rules (e.g., nullable_type_declaration_for_default_null_value) align with our team’s standards?
  • How will we handle conflicts with existing linters/formatters (e.g., ESLint for JS)?

Integration Approach

Stack fit: Ideal for PHP-centric stacks using Composer and modern CI/CD pipelines (e.g., GitHub Actions, Travis). Requires PHP CS Fixer as a dependency but no runtime changes. Not applicable for non-PHP components or monorepos with mixed languages.

Migration path:

  1. Install via composer require --dev amphp/php-cs-fixer-config
  2. Create .php_cs.dist using the provided template, adjusting paths to match project structure
  3. Run dry-run in CI (--dry-run) to quantify violations
  4. Gradually fix violations in small PRs (e.g., by directory) to avoid merge conflicts
  5. Enforce via pre-commit hook for developer convenience

Compatibility: Works with PHP CS Fixer v3.5+ and PHP 7.4+. Verify compatibility with existing tooling (e.g., IDE integrations). Note: The package’s strict_types

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
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
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation