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

Phpcs Phar Laravel Package

jin2chen/phpcs-phar

A Composer-installable PHAR distribution of PHP_CodeSniffer (PHPCS), making it easy to run coding-standard checks in local development and CI without managing a separate PHPCS installation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Tooling isolation as an architecture choice. Decides whether code-quality tooling lives in the app's require-dev graph or is consumed as an opaque binary. This package exists specifically to make that separation possible, so it anchors the "dev tooling must not constrain app dependencies" decision.
  • Build vs. buy on linting. Instead of writing custom style checks, adopt PHP_CodeSniffer's sniff library and a phpcs.xml ruleset. The PM decision is about which standard (PSR-12, Slevomat, Laravel-flavored), not about building a linter.
  • Where the quality gate sits on the roadmap. Pre-commit hook (fast feedback, easy to bypass) vs. CI-only (authoritative, slower) vs. IDE-only (advisory). This package ships both phpcs and phpcbf, which makes a "warn locally, block in CI, autofix on demand" rollout practical.
  • Technical-debt remediation sequencing. phpcbf enables a credible plan for legacy codebases: baseline the current errors, ratchet the ruleset, and auto-fix incrementally rather than freezing feature work for a mass reformat.
  • Use cases it supports: greenfield Laravel services standardizing on day one; monorepos/packages where PHPCS must not become a shared runtime dependency; migration programs measuring style debt over time; onboarding where a single vendor/bin/phpcs invocation is the only setup step.
  • Risk posture decision. Because this is a redistribution of someone else's tool rather than the tool itself, adopting it is an explicit decision to accept a vendor-of-a-vendor in the supply chain. That belongs in the PM's dependency policy, not just an engineer's PR.
  • Social proof caveat worth flagging: the 10.7k stars belong to upstream squizlabs/PHP_CodeSniffer, not to this wrapper, which has zero recorded dependents. Popularity here is inherited, not earned — it validates the underlying tool, not the packaging.

When to Consider This Package

Consider it when:

  • You explicitly want PHPCS runnable in CI and pre-commit without PHP_CodeSniffer's transitive dependencies entering your Composer graph — typically to avoid version pins colliding with framework or library constraints.
  • You want a single pinned artifact so a developer laptop and CI produce byte-identical results (no "works on my machine" drift from differing dependency resolution).
  • You already own a working phpcs.xml ruleset and only need a dependable phpcs/phpcbf binary — this is a drop-in, not a new standard to learn.
  • You're doing a short-lived cleanup pass with phpcbf and want minimal footprint while it runs.
  • Your organization has a deliberate tooling-isolation policy and can accept a wrapper maintained outside the upstream project.

Look elsewhere when:

  • Freshness matters. Last release is 2023-02-22, pinning you to PHPCS 3.6.x-era behavior. Upstream has since shipped substantial fixes and broader PHP 8.1–8.3 tokenizer support. Newer language syntax in your code will produce false positives, missed violations, or outright parse errors — a silent loss of gate integrity, which is worse than no gate.
  • Supply-chain review is strict. A third-party repackaging of a flagship tool, zero dependents, and a small publication footprint is a harder procurement conversation than squizlabs/php_codesniffer or phpcsstandards/php_codesniffer as a dev dependency. Also note the upstream project's own governance moved to phpcsstandards — a stale wrapper around a moved upstream is a compounding risk.
  • You need the sniff ecosystem. Custom sniffs loaded via installed_paths, third-party standards, or IDE plugins that expect a PHP-class-based installation are more predictable with a conventional Composer install than with a PHAR.
  • You need support commitments. There is no SLA, no security-response path, and no abandonment guarantee here; exit cost is low, but so is the safety net.
  • You're on a long-horizon roadmap. Choosing a wrapper that already lags upstream means scheduling a migration anyway — often cheaper to start with the maintained path and isolate via a separate tooling Composer project or container image instead.

How to Pitch It (Stakeholders)

For executives (one paragraph): A self-contained, Composer-installable distribution of PHP_CodeSniffer — the industry-standard PHP style checker — that lets us enforce consistent code standards in CI and on developer machines without adding the tool's dependencies to the product we ship. Low cost, minimal lock-in: it's a thin packaging layer over a widely used open-source tool, so replacing it is a one-line change. The tradeoff is that this build is frozen at an early-2023 version of the underlying checker, so it may miss newer PHP syntax; we should treat it as a convenience for tooling isolation, not a long-term platform bet.

For engineering: It's PHPCS in a PHAR. Same phpcs.xml, same sniffs, same exit codes and CLI flags — the only difference is that PHPCS's dependency tree resolves inside the PHAR rather than inside our project, which avoids conflicts with framework-pinned versions. Two things to hold in mind: (1) version lag — 3.6.x-era tokenizer means weaker support for PHP 8.1+ language features, so expect occasional false positives and validate against a real sample of our codebase before enforcing; (2) it's a redistribution, so we own the upgrade decision ourselves rather than inheriting upstream fixes automatically. Recommendation: if the goal is strictly dependency isolation, pilot it behind CI with a non-blocking ruleset first; if the goal is simply to run PHPCS, standardize on upstream as a dev dependency — more current, better supported, and the isolation can be achieved with a separate tooling project or container image.

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.
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
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console