palmtree/php-cs-fixer-config
Shared PHP CS Fixer configuration for Palmtree projects, providing an opinionated ruleset for consistent, modern PHP code style. Install via Composer and extend the base config to enforce project-wide formatting standards with minimal setup.
Architecture fit. This is not an application-layer dependency; it is a developer-tooling package that ships a preconfigured rule set for friendsofphp/php-cs-fixer. Architecturally it is a thin, stateless distributable config (dev-only, autoloaded PHP file). It has zero runtime footprint, no service provider, no facade, no middleware, and no interaction with the Laravel container, HTTP kernel, queue, or Eloquent. For a Laravel codebase its "fit" is therefore binary: it either matches our desired coding standard or it does not, and it is trivially swappable.
Integration feasibility. High in the mechanical sense. Adoption is one composer require --dev plus a .php-cs-fixer.dist.php that returns the package's Config object (optionally with per-project overrides). CI wiring is a single vendor/bin/php-cs-fixer fix --dry-run --diff step. No migrations, no config publishing, no environment variables.
Technical risk. Low technical, high governance. The technical surface is tiny and reversible. The real risk is provenance: 0 stars, 0 dependents, 0 forks, and a description ("PHP CS Fixer config for Palmtree components") that suggests it is an internal-first package published publicly rather than a community project. There is no evidence of external consumers, no version history signal in the supplied metadata, and no indication of a release/BC policy. Pinning to a config package that is effectively single-maintainer and unvalidated by downstream users is a supply-chain and continuity concern, not a correctness concern — the rules it encodes are almost certainly a minor variation on @PSR12/@PhpCsFixer/@Symfony.
Key questions for the maintainer/owner.
friendsofphp/php-cs-fixer major (v3 vs v4 config API differs materially)? What is the supported PHP matrix?laravel/pint (which wraps PHP-CS-Fixer with Laravel's own preset) and to @PhpCsFixer/@PSR12?composer audit and disclosure?Bottom line. Treat this as "a style guide in a box," not as a platform dependency. It is cheap to evaluate and cheap to reverse; the decision hinges on whether we want this rule set and whether we accept a near-zero-adoption maintenance tail.
Stack fit. Neutral-to-good. It slots into the standard Composer dev-tooling layer alongside phpunit, phpstan/larastan, and pint. It has no coupling to Laravel version, PHP framework internals, or our application code, so it composes cleanly with a Laravel 10/11/12 stack and any CI provider that can run Composer + a binary.
Migration path.
--dry-run --diff on a clean branch to measure the blast radius. If the diff touches more than a handful of files, the rule set diverges from our current standard and the "migration" is really a repo-wide reformat — schedule it as a dedicated, isolated, behavior-preserving PR with git blame ignore revs configured.composer lint script alias) so developers get fast local feedback..php-cs-fixer.dist.php as documented overrides rather than forking the package.Compatibility considerations.
Config API will not load under v4 without changes. Confirm the constraint and ensure it does not conflict with the fixer version already resolved elsewhere in the monorepo.composer.lock hygiene. As a dev dependency it must not leak into production images — verify composer install --no-dev and multi-stage Docker builds exclude it.pint is already in the repo, running both is redundant and will produce conflicting fixes. Pick exactly one formatter-of-record.Sequencing. Evaluate (dry-run diff on a representative branch) → decide vs. pint/@PhpCsFixer → pin and lock → reformat in an isolated PR → enforce in CI → retire any redundant formatter. Total elapsed effort is small; the only long-lead item is the one-time reformat PR review.
Recommendation. Run a one-day spike comparing this config against laravel/pint on the actual repo and pick on rule fit, not on the package. Absent a compelling reason to match Palmtree conventions specifically, pint carries materially better maintenance and adoption characteristics at equivalent cost.
Maintenance. Near-zero ongoing effort for us, but the dependency's own maintenance is the exposure. A single-maintainer config package with no visible dependents has a realistic abandonment profile; if it stops tracking PHP-CS-Fixer majors, we eventually face a forced migration or a fork. Mitigation is cheap: pin the minor version in composer.lock, and vendor the rule array into our own .php-cs-fixer.dist.php if the package goes stale — the content is a plain PHP array, so exit cost is hours, not weeks.
Support. First-line support is internal (Composer/PHP tooling is well-trodden). Escalation to the package maintainer is likely best-effort only; do not plan an SLA around upstream fixes. Document the chosen rule set and the override rationale in the repo so the knowledge does not live in one engineer's head.
Scaling. Scales fine — it is a lint step, not a runtime component. The practical scaling limit is CI wall-clock on very large repos; mitigate with --using-cache=yes, path-scoped runs on changed files in PR pipelines, and a full sweep only on the default branch. No concurrency, memory, or throughput concerns beyond fixer runtime.
Failure modes.
php-cs-fixer major bump. Mitigate by pinning both packages in lockstep and testing in CI.--no-dev verification in the build pipeline.pint and this config fighting over style. Mitigate by enforcing a single formatter-of-record.composer audit, and dependency review in CI.Ramp-up. Effectively none. Any PHP developer familiar with PHP-CS-Fixer is productive in minutes; the README-shaped surface is one config file. Onboarding cost is a single line in the contributing guide and a composer lint script alias. The only ramp-up worth budgeting is the one-time team alignment on the rule set and the review of the initial reformat PR.
Overall TPM verdict. Low technical risk, low integration cost, negligible operational burden — but also low strategic value and unproven provenance. Justify adoption only if matching Palmtree conventions is an explicit goal; otherwise standardize on a better-adopted preset and keep this as a reference for rule selection.
How can I help you explore Laravel packages today?