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

irstea/php-cs-fixer-shim

A compatibility shim for php-cs-fixer that provides a stable entry point for PHP coding-style checks and fixes, helping projects avoid dependency and version conflicts while keeping formatting tooling consistent.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a developer-tooling shim, not a runtime library. It belongs in require-dev and has no bearing on Laravel's request lifecycle, service container, or Eloquent layer. Its architecture role is one of two things, and the distinction drives every downstream decision: a metapackage that simply requires friendsofphp/php-cs-fixer at a pinned version (typically to bridge a private registry or lock a version the org standardizes on), or a fork/replacement using Composer's replace/provide semantics to ship patched code. The repository name and the IRSTEA internal GitLab host suggest the former, but this must be confirmed by reading composer.json before any integration decision is made. Note the overlap risk: Laravel ships Pint, which is itself a thin opinionated wrapper around PHP-CS-Fixer. A Laravel codebase using this shim alongside Pint creates two paths to the same binary and a likely style-config collision.

Integration feasibility. Straightforward mechanically — add a vcs repository entry pointing at gitlab.irstea.fr, supply credentials via COMPOSER_AUTH or a deploy token, and composer require --dev. The friction is entirely in access and governance, not in code: private GitLab means every developer machine, CI runner, and container build needs credentialed Composer access, and that credential becomes a build-time hard dependency.

Technical risk.

  • Zero external signal. 0 stars, 0 dependents, score 0. This is an internal artifact with no community validation, no issue tracker visibility, and no bus factor beyond the owning team. That is acceptable for internal infra and disqualifying as a strategic dependency.
  • Upstream drift. If it pins PHP-CS-Fixer, you inherit the pin's CVE exposure and PHP-version ceiling. If it forks, upstream security and PHP 8.4 compatibility patches will not flow automatically.
  • Resolution conflicts. Coexistence with laravel/pint or a direct friendsofphp/php-cs-fixer requirement can produce Composer solver failures or, worse, silently resolve to a version you did not intend.
  • Low blast radius. Because it never loads in production, worst case is broken CI and developer friction — not an outage.

Key questions.

  1. Is it a metapackage, a fork with patches, or a Composer repository mirror? What exactly does it require/replace/provide?
  2. Why does it exist — private registry bridge, version pin, or an actual upstream patch? If patched, what is the patch and is it upstreamable?
  3. Which PHP-CS-Fixer major/minor does it track, and what is the update contract when upstream releases?
  4. Who owns it, what is the on-call/support model, and what is the stated deprecation path?
  5. Is it published to Packagist or exclusively to the internal GitLab?
  6. Does it declare conflicts with laravel/pint? Which is the org's intended single source of truth for style?
  7. License and PHP version support matrix.

Integration Approach

Stack fit. Laravel 10–12 on PHP 8.1–8.4 with Composer 2. The shim slots into the dev toolchain alongside or in place of Pint, feeding .php-cs-fixer.dist.php config and typically invoked through a Composer script (composer lint, composer fix), a GitLab CI job, or a pre-commit hook (GrumPHP, CaptainHook).

Migration path.

  1. Read the shim's composer.json and any README — resolve the metapackage-vs-fork question first.
  2. Stand up a throwaway Laravel skeleton with the private repo configured and install the shim in isolation.
  3. Run php-cs-fixer fix --dry-run --diff against a representative fixture set and compare output against the project's current Pint/config baseline.
  4. If it is a drop-in replacement for an existing pin, swap it in on one branch and diff the lockfile.
  5. If it changes formatting behavior, stage the reformat as a single isolated commit — never bundled with feature work.
  6. Pilot on one repository, then codify in the shared CI template.

Compatibility. Verify the PHP constraint against your oldest supported runtime, confirm there is no duplicate friendsofphp/php-cs-fixer requirement in the root project, and check whether the shim's replace (if present) would mask a directly-required version. Audit the lockfile diff, not just the resolver's success message.

Sequencing. Resolve the access/credential story (GitLab deploy token, COMPOSER_AUTH in CI variables) before touching application repos — credential plumbing is the actual long pole. Then: sandbox validation → single-repo pilot → CI template → rollout → documentation.

Operational Impact

Maintenance. The shim inserts a hop into the upgrade chain: PHP-CS-Fixer release → shim bump → consuming repos. Each hop is a manual act by a team that may not prioritize it. Pin exact versions, set a quarterly review against upstream releases, and write down explicit exit criteria — "if the shim lags upstream by more than two minor versions, we drop it and require friendsofphp/php-cs-fixer directly." Given zero external dependents, there is no community pressure to keep it current.

Support. Internal-only. No Stack Overflow surface, no upstream maintainer to escalate to. Onboarding requires an internal README covering what the shim is, why it exists, and how to debug a failed install. The credential rotation runbook matters as much as the tool documentation.

Scaling. Compute cost is negligible — it is a dev dependency that never runs in production. The scaling problem is configuration fan-out: N repositories each need the VCS repo entry and working credentials. Centralize with a Satis/Private Packagist mirror or a shared config.json/base CI image so credentials and repository definitions live in one place. Full-repo fixer runs on large monorepos can consume meaningful CI minutes; scope to changed files where possible.

Failure modes.

  • GitLab unreachable or token expired → every composer install in every pipeline fails simultaneously. Highest-severity, most likely failure.
  • Upstream version yanked or retagged → non-reproducible installs unless committed lockfiles are enforced.
  • Silent style drift after a shim bump → mass reformat commits that pollute git blame and create merge conflicts across open branches.
  • Solver conflict with Pint or a direct fixer requirement → resolution failure with an opaque error.
  • Abandonment → accumulates PHP-version and security debt invisibly, because nothing in production breaks to signal it.

Ramp-up. Low. A mid-level developer is productive in under an hour; the tool follows standard PHP-CS-Fixer conventions and configuration. The genuine cost is governance and credential management, not learning curve — which is precisely why this should be treated as internal infrastructure with a named owner rather than adopted as a dependency with implicit trust.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource