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

Coding Standard Laravel Package

phpmyadmin/coding-standard

PHP_CodeSniffer ruleset from phpMyAdmin, built on the Doctrine Coding Standard, for enforcing consistent PHP code style. Install it with Composer as a dev dependency, then run vendor/bin/phpcs --standard=PhpMyAdmin against your codebase to catch style issues early.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • This is not an application or framework package. It ships no runtime code, no service provider, no config surface, no migrations. It is a PHP_CodeSniffer ruleset registered under the standard name PhpMyAdmin, consumed exclusively as a require-dev dependency and invoked from the CLI or CI. Architectural blast radius on the Laravel application is effectively zero.
  • The consequence is that the decision is not a technology decision, it is a standards governance decision. The question is not "does this fit our architecture" but "do we want phpMyAdmin's house style, expressed through Doctrine's sniffs, enforced on a Laravel codebase, and who owns that choice."
  • The dependency chain is three levels deep: phpmyadmin/coding-standard → doctrine/coding-standard → slevomat/coding-standard → squizlabs/php_codesniffer. Doctrine's release cadence effectively becomes ours. phpMyAdmin's package is largely a thin override layer on top of Doctrine (releases 4.1.0, 3.0.0, 2.1.0 are all "bump doctrine").
  • The ruleset was tuned against phpMyAdmin's codebase — legacy procedural PHP with a long history. Laravel idioms (facades, global helpers, app/ PSR-4 conventions, attributes, enums, promoted constructor properties) are not what Doctrine's sniffs were designed around. Expect false positives on idiomatic Laravel and silence where Laravel-specific opinions would be valuable.
  • The dominant architectural concern is tool overlap. Laravel ships Pint (PHP-CS-Fixer) by default, which auto-fixes. PHPCS reports, and phpcbf fixes a smaller subset. Running both without a nominated authority produces a reformat/re-flag loop that erodes trust in both tools. This must be resolved in design, not discovered in rollout.

Integration feasibility

  • Mechanically trivial. composer require --dev phpmyadmin/coding-standard, add <rule ref="PhpMyAdmin"/> to phpcs.xml.dist, wire a Composer script and a CI step. A single engineer can produce a working proof of concept in under a day.
  • CI-provider agnostic — it is a plain binary invocation. IDE support exists via the standard PHPCS integrations in PHPStorm and VS Code, which materially improves the developer experience during adoption.
  • Non-PHP surfaces must be excluded up front or the gate becomes noise: resources/views/ (Blade), public/, storage/, bootstrap/cache/, and typically tests/ or a relaxed ruleset for tests. Run with --extensions=php.
  • Auto-fix coverage is materially weaker than Pint's. If the stakeholder expectation is "one command and the code is clean," this package will underdeliver against that expectation. Set it correctly at the outset: PHPCS is a gate, Pint is a formatter.

Technical risk

  • Adoption risk, not code risk, dominates. 19 stars, 0 dependents, single-project origin. The roadmap is phpMyAdmin's internal backlog. If their style shifts, our gate shifts underneath us with no consultation.
  • Release metadata should not be trusted as a maintenance signal. The listed last release date (2026-08-13) is future-dated relative to the present, so recency cannot be used as evidence of active maintenance. Verify actual tags, commit cadence, and open-issue responsiveness in the repository before asserting the project is healthy in any stakeholder document.
  • Transitive drift risk. Because releases are Doctrine upgrades, a minor bump can activate new sniffs across the entire codebase simultaneously. That is a breaking change to our CI gate delivered as a patch-level dependency update — exactly the shape of change that gets auto-merged by Renovate and turns every open PR red on a Tuesday morning.
  • Fork liability is a real fork in the road. Override heavily and we maintain a fork in all but name. Override lightly and we accept rules written for a codebase that is not ours. Both branches carry recurring cost; there is no zero-cost position.
  • Overall: cannot break production. Risk concentrates in developer friction, CI flakiness, and unclear ownership.

Key questions

  1. What problem are we solving — formatting consistency, defect prevention, or audit/compliance evidence? This package credibly solves only the first and weakly supports the third.
  2. Does Pint already satisfy our formatting requirement, making this a redundant second opinion? If so the correct decision is defer, not evaluate.
  3. Have we priced laravel-shift/php-coding-standards — a Laravel-native alternative maintained for exactly this context — before defaulting to a phpMyAdmin-tuned ruleset?
  4. What is our override budget? If we will disable more than roughly 20% of sniffs, we are authoring our own standard and should own it explicitly rather than layering over someone else's.
  5. Who is the named owner of the standard after the adopting engineer rotates off? No owner, no adoption — this is the single most common cause of post-rollout decay.

Integration Approach

Stack fit

  • Good fit: Laravel 10–11 codebases already using PHPCS with an existing phpcs.xml.dist, wanting a stricter-than-PSR-12 gate without authoring sniffs. Also reasonable for teams that contribute to or interoperate with phpMyAdmin.
  • Poor fit: teams standardized on Pint or php-cs-fixer (redundant and conflicting), greenfield Laravel services with no legacy style debt, monorepos where the PHP surface is a minority of the code, or organizations that need dashboards and trend reporting — that is SonarQube/Qodana territory, not PHPCS.
  • Confirm the transitively resolved PHPCS version supports baseline generation before committing to an incremental rollout. If it does not, the sequencing below changes materially.

Migration path

  1. Baseline before committing. Run the standard against app/ only and capture the violation count. That number is the real scope estimate. Do not give a rollout date before you have it.
  2. Triage into three buckets: (a) auto-fixable via phpcbf — one PR; (b) genuine findings worth fixing — backlog; (c) rules that fight Laravel idiom — the actual decision input and the basis for our override file.
  3. Adopt via baseline file so the gate is green on day one and only new violations block. This is the highest-leverage sequencing decision available: it converts a potentially multi-sprint cleanup into a one-sprint change.
  4. New code first. Enforce on changed files in PRs, then repo-wide. Avoids the mid-sprint "everything is red" revolt.
  5. Burn down debt as a background track, visible but not blocking.

Compatibility

  • Pin the dependency (^4.1.0 or exact) and commit composer.lock. Given that upstream releases are Doctrine-upgrade-driven, unpinned minors are CI-breaking changes disguised as routine updates.
  • Resolve the Pint conflict in writing: Pint owns formatting, phpcs owns non-formatting static style — or drop Pint. The documented decision matters more than which side wins.
  • Exclusions to author explicitly: resources/views/, public/, storage/, bootstrap/cache/, generated code, and either exclusion or a relaxed ruleset for tests/.
  • Validate against Laravel 11 language constructs (enums, attributes, readonly properties, promoted constructor params). Doctrine's base is generally current; phpMyAdmin's override layer may lag.

Sequencing

Phase Action Exit criterion Est. effort
0. Alternatives Benchmark against Pint and laravel-shift/php-coding-standards on ~20 representative files Written recommendation with violation-count comparison 1–2 days
1. Baseline phpcs --standard=PhpMyAdmin app/ --report=summary on main Documented violation count + bucket split 0.5 day
2. Config spike Author phpcs.xml.dist with exclusions and documented overrides on a branch Ruleset reviewed by two senior engineers 1–2 days
3. Baseline file Generate .phpcs-baseline.xml; gate blocks only new violations CI green on main 0.5 day
4. PR gate Enforce on changed files; warnings for a 2-week soak Zero escalations from engineers 1 sprint
5. Wider enforcement Promote to error-level repo-wide; shrink baseline sprint over sprint Baseline trending down 2–4 sprints
6. Governance Named owner, override rationale documented, added to onboarding CODE_STANDARDS.md merged Ongoing

Total to a stable, enforced gate: roughly one to two sprints of elapsed time and under two weeks of engineering effort, contingent on the Phase 1 violation count not being catastrophic.

Operational Impact

Maintenance

  • Two surfaces: the dependency chain (ours to track) and our override file (ours to own). Budget a few hours per quarter for upstream review, plus unplanned hits whenever a transitive Doctrine bump activates new sniffs — historically the dominant release pattern for this package.
  • Mitigation is mundane and therefore frequently skipped: pin versions, let Renovate open the PR, and require a human to read the sniff diff before merging. An auto-merged coding-standard bump can invalidate every open PR simultaneously.
  • Config drift is the quiet failure. Overrides accumulate in phpcs.xml.dist with no rationale; eighteen months later nobody can distinguish phpMyAdmin's rules, Doctrine's rules, and rules disabled for a reason that no longer holds. Require a one-line comment per override — cheap now, expensive later.
  • Pre-decide the fork trigger. If upstream diverges from our needs in more than a handful of places, copy the ruleset into our repo and drop the dependency. A ruleset is a few hundred lines of XML; lock-in is far lower than it feels, and having the trigger written down removes the debate later.

Support

  • Support load is front-loaded and developer-facing: onboarding docs, IDE setup, and "why is this failing" questions in the first two weeks. Expect 3–5 distinct questions that then repeat indefinitely — answer them once, in writing.
  • The highest-volume ticket will be "Pint and phpcs disagree." Solve it before rollout, not during it.
  • The second will be "this rule is wrong for Laravel." Publish a 24-hour decision path for override requests. Without one, engineers will self-serve with inline phpcs:ignore comments and the gate silently becomes theatre.
  • No vendor support channel exists. Escalation is: read our ruleset XML → read the Doctrine sniff → open an upstream issue → fork. Set that expectation with stakeholders in the approval document, not after the first blocker.

Scaling

  • Runtime is acceptable: PHPCS is single-threaded but fast on a typical Laravel app/ tree. If scans exceed 60–90 seconds in CI, add --cache and scope PR runs to changed files. Do the changed-files scoping regardless — it is the correct default.
  • Scaling teams is the harder axis. Uniform enforcement across multiple squads only holds if the standard is stable and explainable. A ruleset that changes quarterly with undocumented rationale will be routed around. Operate the ruleset as a product with a changelog and an owner, not as a config file.
  • Past 2–3 squads, the realistic answer is consolidation: one formatting authority (Pint) and, if this package survives at all, a narrow supplementary gate — not an org-wide standard.

Failure modes

Failure mode Likelihood Impact Mitigation
Pint/PHPCS conflict loop; engineers disable both High High Nominate one formatter; scope phpcs to non-formatting sniffs
Big-bang enforcement floods the team with violations High if unsequenced High Baseline file + changed-files-only gate in Phase 4
Doctrine bump breaks all open PRs Medium Medium Pin versions; mandatory human review on standard bumps
Upstream abandonment / phpMyAdmin reprioritizes Medium (19 stars, 0 dependents) Medium Fork or vendor the ruleset; switching cost is low
Override creep makes the ruleset undocumented and unownable High over 12+ months Medium Comment-per-override; quarterly ruleset review
Gate becomes theatre via inline phpcs:ignore Medium High Fast override-decision SLA; audit ignore-comment counts

Ramp-up

  • Engineer time: under two weeks total to a stable, enforced gate; one to two sprints elapsed including soak.
  • Team time: roughly 30 minutes per engineer for the first-failure walkthrough plus IDE plugin setup. Produce a single onboarding doc and stop repeating it verbally.
  • Organizational time: one decision session to settle the Pint-versus-PHPCS authority and nominate an owner. This is the gating item — not the technical work.
  • Recommendation to stakeholders: approve a timeboxed 3–5 day evaluation comparing this package against Pint-only and laravel-shift/php-coding-standards, with a written recommendation and violation-count comparison as the deliverable. Given 19 stars, zero dependents, unreliable release metadata, and a strong Laravel-native alternative, the expected outcome is "Pint plus a narrow supplementary gate" or "adopt the Laravel-native standard" rather than adopting this package directly. Approving the evaluation is cheap; approving a multi-sprint rollout without it is not.
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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums