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.
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.phpcs.xml ruleset. The PM decision is about which standard (PSR-12, Slevomat, Laravel-flavored), not about building a linter.phpcs and phpcbf, which makes a "warn locally, block in CI, autofix on demand" rollout practical.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.vendor/bin/phpcs invocation is the only setup step.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.Consider it when:
phpcs.xml ruleset and only need a dependable phpcs/phpcbf binary — this is a drop-in, not a new standard to learn.phpcbf and want minimal footprint while it runs.Look elsewhere when:
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.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.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.
How can I help you explore Laravel packages today?