- How do I install palmtree/php-cs-fixer-config in a Laravel project?
- Install it as a dev dependency with composer require --dev palmtree/php-cs-fixer-config, which brings in friendsofphp/php-cs-fixer alongside it. There is no service provider, facade, or config publishing step, because the package is a stateless distributable config file. You then reference its Config object from a .php-cs-fixer.dist.php at your project root and run vendor/bin/php-cs-fixer.
- Does palmtree/php-cs-fixer-config work with Laravel 10, 11, and 12?
- The package has no coupling to the Laravel framework itself; it only configures PHP-CS-Fixer, so it composes fine with Laravel 10, 11, and 12. The real compatibility axis is the PHP-CS-Fixer major version, since the v3 and v4 Config APIs differ materially, plus your PHP version matrix. Verify both constraints in the package's composer.json before adopting it into a long-lived project.
- How do I write a .php-cs-fixer.dist.php that uses this config?
- Create a .php-cs-fixer.dist.php at your project root that requires the Composer autoloader and returns the package's Config object, optionally passing your own Finder or rule overrides. Using a dist variant allows developers to keep a gitignored local .php-cs-fixer.php for personal tweaks. This project-local file is also the right place to document rule disagreements rather than forking the package.
- How do I run this fixer as a CI check in GitHub Actions or GitLab CI?
- Add one step that runs vendor/bin/php-cs-fixer fix --dry-run --diff, which exits non-zero when files need reformatting and prints the diff for reviewers. Because there are no migrations, environment variables, or publish steps, the CI wiring really is a single command. Consider running it as report-only for one iteration before making it a blocking gate so you can surface rule conflicts first.
- Which PHP-CS-Fixer version does palmtree/php-cs-fixer-config require?
- A config written against the PHP-CS-Fixer v3 Config API will not load cleanly under v4, so this is the critical compatibility axis to check. Read the friendsofphp/php-cs-fixer constraint in the package's composer.json and confirm it matches what your other tooling expects. If the constraint is missing or open-ended, pin the fixer version yourself to avoid a surprise break on composer update.
- How does this compare to Laravel Pint?
- Pint wraps PHP-CS-Fixer with Laravel's own opinionated preset and ships as a self-contained PHAR that needs zero configuration. This package instead gives you the Palmtree rule set, which is almost certainly a variation on @PSR12, @PhpCsFixer, or @Symfony, applied through a standard PHP-CS-Fixer install you control. Choose Pint for Laravel's default style with no setup; choose this package when you want an explicit, reviewable ruleset checked into your repo.
- Can I override individual rules without forking the package?
- Yes. The package exposes a Config object you extend in your own .php-cs-fixer.dist.php, so you can adjust the Finder or merge project-specific rules on top. Documented project-local overrides are preferable to forking, because a fork means you inherit the burden of tracking upstream changes forever. Pin the version too, since a rule change upstream will silently reformat every file in the repository.
- Does this package add any runtime overhead or production dependency to my Laravel app?
- No. It is a dev-only, autoloaded PHP file with no service provider, facade, middleware, queue job, or Eloquent interaction, so it has zero runtime footprint. It should never be installed with --no-dev and is trivially removable from composer.json. That also means it can never affect your Laravel version compatibility or deployment artifacts.
- What is the blast radius of adopting this ruleset on an existing codebase?
- Run the config with --dry-run --diff on a clean branch first to measure exactly how many files would change. If the diff is large, treat adoption as a dedicated, isolated, behavior-preserving reformat PR rather than mixing it into feature work. Configure git blame ignore revs so the reformat does not pollute blame history for every line of the codebase.
- Who maintains palmtree/php-cs-fixer-config and is it safe to depend on?
- The package looks like an internal-first artifact published publicly for Palmtree components, with little evidence of external consumers, forks, or dependents. The technical risk is low because the surface is tiny and reversible, but the governance risk is real: a single-maintainer config package with no visible release cadence or backwards-compatibility policy. Pin an exact version, review rule diffs on upgrade, and be ready to swap in @PSR12, @PhpCsFixer, or Pint if maintenance stalls.