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 Coding Standard Laravel Package

hosmelq/php-coding-standard

Hosmelq's PHP Coding Standard offers an opinionated, Laravel-friendly ruleset for PHP-CS-Fixer, helping teams enforce consistent code style with minimal configuration. Install it via Composer and run the fixer to format your projects automatically.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Scope caveat: This assessment is derived from a single release note (v1.1.0) and no prior assessment, package manifest, or usage telemetry. Conclusions are directional and should be re-validated against the package's composer.json and README before adoption decisions.

Architecture fit. The change decouples the package from a hard dependency on pestphp/pest-plugin-rector, moving Pest-specific Rector rules behind an opt-in flag (RECTOR_PEST). Architecturally this is the right shape for a dev-tooling package: it converts an unconditional transitive dependency into a capability gate. That reduces constraint pressure on consuming projects' dependency graphs, which is the primary historical failure mode for Rector/Pest/PHP tooling combos.

Integration feasibility. Low-to-moderate. For the majority of consumers who do not set RECTOR_PEST, the change is inert on the happy path — Composer simply stops pulling a plugin they weren't actively driving. For consumers who do set RECTOR_PEST, integration becomes a two-step requirement: set the env var and explicitly require the plugin. That is a documented, mechanical change, but it is a change to the install contract.

Technical risk.

  • Silent degradation (highest concern). If RECTOR_PEST is set but the plugin is absent, the package must fail loudly (exception/exit with actionable message), not silently skip Pest rules. A silent skip produces green CI on an incomplete rule set — the worst outcome for a refactoring tool.
  • Semver ambiguity. Loosening a hard dependency is conventionally minor/patch-safe, but if the package previously relied on the plugin being present for default behavior, this is behaviorally breaking for a subset of users despite the version number.
  • Constraint-matrix spread. The stated motivation (Pest 4 + Laravel 12 testing) implies the package now spans a wider Pest/PHP/Laravel support matrix. Wider support surface means more combinations that are claimed but not continuously verified.
  • Undocumented flag discoverability. Env-var-gated features are invisible in IDE/static analysis; discoverability depends entirely on docs quality.

Key questions for the maintainer.

  1. Does RECTOR_PEST=1 without the plugin throw, warn, or no-op? Please show the emitted message.
  2. What is the declared support matrix (PHP, Laravel, Pest, Rector versions) and which cells run in CI?
  3. Is the plugin still listed under require or moved to suggest/require-dev? Does composer why pestphp/pest-plugin-rector still resolve on a fresh install?
  4. Is v1.1.0 intended as backward compatible for existing RECTOR_PEST users, and is there a changelog entry or upgrade note for them?
  5. Any config-file equivalent to the env var (preferred for reproducibility over ambient env state)?

Integration Approach

Stack fit. This is developer-time tooling, not runtime code — it belongs in require-dev and has no bearing on production artifacts, autoloading, or request-path behavior. That makes it a low-blast-radius adoption regardless of application architecture, and it should be evaluated on CI ergonomics rather than on application design.

Migration path.

  1. Pin the current working version; run the suite to establish a baseline rule-output diff.
  2. Upgrade to v1.1.0 in a single non-production branch.
  3. If RECTOR_PEST is in use anywhere (check CI config, .env, Makefile, Dockerfiles, and any rector.php), add pestphp/pest-plugin-rector to require-dev explicitly in the same commit — do not split these, or you create a window of silent rule loss.
  4. Confirm the plugin resolves under the project's Pest 4 / Laravel 12 constraints; if resolution fails, that is the signal to keep the prior pin for now.
  5. Re-run the dry-run diff and compare against the baseline from step 1. Any delta should be explainable by the new optional-dependency behavior, not by unexplained rule changes.

Compatibility. Verify explicitly against the project's PHP and Laravel versions rather than trusting the note's framing. The note's mention of "test Laravel 12" describes the maintainer's CI, not a guarantee for your matrix. Treat Pest 3→4 as a separate, larger migration and do not bundle it into this upgrade.

Sequencing. Adopt this before any Pest 4 or Laravel 12 upgrade, not after. The whole point of the change is to unblock that path by removing a dependency conflict; consuming it first means the later framework upgrade is one variable instead of two. Roll out to one repository, hold one release cycle, then propagate.

Operational Impact

Maintenance. Net positive. One fewer transitive dependency to be pinned against by Pest/Rector release cadence, which should reduce the frequency of "cannot resolve your dependency set" support tickets. The cost is that the maintainer now owns a conditional code path — two configurations to test instead of one — so expect the CI matrix to grow.

Support. Documentation debt is the main exposure. Three things must be documented or the change generates tickets: (a) that the plugin is now optional, (b) that RECTOR_PEST requires it, and (c) the exact error text users will see when they get it wrong. Env-var-gated behavior with no config-file equivalent also means support cases become "what is in your environment," which is harder to triage than "what is in your committed config."

Scaling. Effectively unbounded and non-critical: this runs per-developer and per-CI-job, and its resource profile is unchanged. The scaling concern is organizational, not computational — every additional consumer repository inherits the RECTOR_PEST-plus-explicit-plugin contract, so the migration note must be circulated rather than assumed.

Failure modes to instrument.

  • Silent rule skip — RECTOR_PEST set, plugin missing, run succeeds with fewer transformations. Highest severity; detect via rule-count or dry-run-diff assertions in CI.
  • Resolution failure — plugin cannot be added under current Pest 4 constraints; surfaces as a Composer error at install, which is at least loud.
  • Env-var drift — flag set locally but not in CI (or vice versa), producing divergent refactor output between a developer's machine and the pipeline.
  • Rule-output drift — upgraded tooling proposes different transformations than the pinned version; caught only by keeping a dry-run diff artifact to compare against.

Ramp-up. Low, roughly half a day for a team already running Rector: one dependency decision, one possible require-dev line, and a CI re-run. Teams that have not run Rector before should not use this release as the entry point — sequence basic Rector adoption first, since the Pest-rule opt-in adds a second concept on top of an already unfamiliar tool.

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.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource