PHPackages                             spaze/phpcs-phar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. spaze/phpcs-phar

ActiveLibrary[CLI &amp; Console](/categories/cli)

spaze/phpcs-phar
================

PHP\_CodeSniffer phar releases, automated and always up-to-date

4.0.1(6mo ago)11.7k1BSD-3-ClausePHPPHP &gt;=7.2.0CI passing

Since Jan 31Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/spaze/phpcs-phar)[ Packagist](https://packagist.org/packages/spaze/phpcs-phar)[ RSS](/packages/spaze-phpcs-phar/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (24)Used By (1)

PHP\_CodeSniffer phar releases, automated and always up-to-date
===============================================================

[](#php_codesniffer-phar-releases-automated-and-always-up-to-date)

[![Create a phar release](https://github.com/spaze/phpcs-phar/actions/workflows/create-release.yml/badge.svg)](https://github.com/spaze/phpcs-phar/actions/workflows/create-release.yml)[![PHP Tests](https://github.com/spaze/phpcs-phar/actions/workflows/php.yml/badge.svg)](https://github.com/spaze/phpcs-phar/actions/workflows/php.yml)

This repo contains phar releases of [PHPCSStandards/PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer).

The files are downloaded from the [PHP\_CodeSniffer release pages](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases), and if changed, they're commited and a release is created with the same version number as the upstream release.

The whole thing is powered by a GitHub Actions [workflow](.github/workflows/create-release.yml).

I have created this for my personal usage to overcome the [performance issues](https://github.com/microsoft/WSL/discussions/9412) of the 9P filesystem as used by WSL2. The PHPCSStandards organization is also planning to [create a Composer phar release](https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/318) so this repository will cease to exist one day, either when the official Composer phar is released, or when the 9P performace is sufficient, or when I retire. Consider yourself warned.

Installation
------------

[](#installation)

Install with [Composer](https://getcomposer.org/):

```
composer require --dev spaze/phpcs-phar

```

Installing coding standards
---------------------------

[](#installing-coding-standards)

The phar releases in this repository do not work with the PHP\_CodeSniffer Standards Composer Installer Plugin (the [`dealerdirect/phpcodesniffer-composer-installer`](https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer) package). Be warned that this package even replaces the installer plugin in its `composer.json`.

There are several reasons for that:

1. The installer plugin [looks](https://github.com/PHPCSStandards/composer-installer/blob/290bcb677628f4d829f64a4337bf0b9237238f0b/src/Plugin.php#L47) for a different installed package, `squizlabs/php_codesniffer` to add more standards to
2. The plugin creates a configuration file with a relative path to the standard being installed, so the code sniffer then expects the standard to be present inside the phar file, which is not the case

However, there are multiple different ways to install a standard. Let's say you want to add [`slevomat/coding-standard`](https://github.com/slevomat/coding-standard), you can:

### Auto-install the available standards

[](#auto-install-the-available-standards)

If the `CodeSniffer.conf` file doesn't exist, this package will find and auto-install all available coding standards on each execution. The altered configuration is not persisted, no config file will be created, because it would be removed on each package update anyway. This is the recommended option emulating the Standards Composer Installer Plugin to a certain point. The performance is comparable to using the installer plugin as only Composer metadata are used to find the installed coding standards.

### Modify the config file

[](#modify-the-config-file)

1. In your project, run ```
    vendor/bin/phpcs --config-set installed_paths ../../slevomat/coding-standard

    ```
2. Locate the `CodeSniffer.conf` file in your `vendor/spaze/phpcs-phar` directory
3. Edit the path to the installed standard and make it an absolute path, for example change ```
    'installed_paths' => '../../slevomat/coding-standard'
    ```

    to ```
    'installed_paths' => __DIR__ . '/../../slevomat/coding-standard'
    ```

Please be aware that the `CodeSniffer.conf` file will be removed on each package update.

### Install the standard using an absolute path

[](#install-the-standard-using-an-absolute-path)

In your project, run

```
vendor/bin/phpcs --config-set installed_paths $(realpath vendor/slevomat/coding-standard)

```

or use any absolute path for the `installed_paths` value.

Please be aware that the `CodeSniffer.conf` file will be removed on each package update.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance69

Regular maintenance activity

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~36 days

Total

23

Last Release

189d ago

Major Versions

3.13.4 → 4.0.02025-09-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/6777bd445610e6e458e4d41bdefa3070d2ed4e068323362353b061b15e9ff81b?d=identicon)[spaze](/maintainers/spaze)

---

Top Contributors

[![spaze](https://avatars.githubusercontent.com/u/1966648?v=4)](https://github.com/spaze "spaze (28 commits)")

---

Tags

automationclicoding-standardsphpphpcbfphpcspsr1psr12psr2qastatic-analysisdev

### Embed Badge

![Health badge](/badges/spaze-phpcs-phar/health.svg)

```
[![Health](https://phpackages.com/badges/spaze-phpcs-phar/health.svg)](https://phpackages.com/packages/spaze-phpcs-phar)
```

###  Alternatives

[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[buggregator/trap

A simple and powerful tool for debugging PHP applications.

2591.7M40](/packages/buggregator-trap)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1862.1M27](/packages/dereuromark-cakephp-ide-helper)[projektgopher/whisky

A simple CLI tool for managing a project's git hooks across multiple members.

241281.3k20](/packages/projektgopher-whisky)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
