PHPackages                             alleyinteractive/alley-coding-standards - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. alleyinteractive/alley-coding-standards

ActivePhpcodesniffer-standard[Testing &amp; Quality](/categories/testing)

alleyinteractive/alley-coding-standards
=======================================

PHPCS sniffs for Alley Interactive

v2.4.1(3mo ago)7335.7k—3.4%[2 PRs](https://github.com/alleyinteractive/alley-coding-standards/pulls)20GPL-2.0-or-laterPHPCI passing

Since May 22Pushed 3mo ago30 watchersCompare

[ Source](https://github.com/alleyinteractive/alley-coding-standards)[ Packagist](https://packagist.org/packages/alleyinteractive/alley-coding-standards)[ RSS](/packages/alleyinteractive-alley-coding-standards/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (27)Used By (20)

Alley Coding Standards
======================

[](#alley-coding-standards)

[![Example of a badge pointing to the readme standard spec](https://camo.githubusercontent.com/4d148b38f9c13f71b15b80f0bd583698fd5a5ab9bd7dfe61d40e1e30aec35399/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f726561646d652532307374796c652d7374616e646172642d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/RichardLitt/standard-readme)

This is a PHPCS ruleset for [Alley Interactive](https://alley.com).

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

[](#installation)

To use this standard in a project, declare it as a dependency.

```
composer require --dev alleyinteractive/alley-coding-standards
```

This will install the latest compatible version of PHPCS, WPCS, and VIPCS to your vendor directory in order to run sniffs locally.

You can also manually add this to your project's `composer.json` file as part of the `require` property:

```
"require": {
	"alleyinteractive/alley-coding-standards": "^2.0"
}
```

Usage
-----

[](#usage)

To use this standard with `phpcs` directly from your command line, use the command:

```
vendor/bin/phpcs --standard=Alley-Interactive .
```

Alternatively, you can set this as a composer script, which will automatically reference the correct version of `phpcs` and the dependent standards.

```
"scripts": {
	"phpcs" : "phpcs --standard=Alley-Interactive ."
}
```

Then use the following command:

```
composer run phpcs
```

You can also pass arguments to the composer phpcs script, following a `--` operator like this:

```
composer run phpcs -- --report=summary
```

### Extending the Ruleset

[](#extending-the-ruleset)

You can create a custom ruleset for your project that extends or customizes these rules by creating your own `phpcs.xml` file in your project, which references these rules, like this:

```

  Example project ruleset

```

Testing
-------

[](#testing)

When contributing to this project, modifications to the ruleset should have a corresponding test in the `tests` directory. For the most part, this takes the form of a passing test in `tests/fixtures/pass` and a failing one in `tests/fixtures/fail`.

You can run the tests with `composer phpunit`. If you want to run PHPCS against the test fixtures, you can run `composer phpcs:fixtures` to ensure that what is passing/failing matches your expectations.

### Special Considerations for failure expectations

[](#special-considerations-for-failure-expectations)

For failing fixtures in `tests/fixtures/fail`, we recommend keeping the files smaller and focused on the specific sniff being tested. A corresponding file should be created in `tests/fixtures/fail/expectations`referencing the expected source of the failures for that test file. Name the file the same as you do the fixture (e.g. `tests/fixtures/fail/foo.php` and `tests/fixtures/fail/expectations/foo.php`).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

This project is actively maintained by [Alley Interactive](https://github.com/alleyinteractive). Like what you see? [Come work with us](https://alley.com/careers/).

License
-------

[](#license)

The GNU General Public License (GPL) license. Please see [License File](LICENSE) for more information.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance80

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~115 days

Recently: every ~68 days

Total

19

Last Release

110d ago

Major Versions

v0.4.1 → v1.0.02022-12-12

v1.0.1 → v2.0.02023-09-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/338d27065b1074f2d66d049d742f22996dd137eef6f91bc8f75350ceee1e8ef2?d=identicon)[srtfisher](/maintainers/srtfisher)

![](https://www.gravatar.com/avatar/d2679da8ee30c4d7eae16ffd2271484027b3b27be6d7fb8202d5e4c6d210881d?d=identicon)[alleyinteractive](/maintainers/alleyinteractive)

---

Top Contributors

[![srtfisher](https://avatars.githubusercontent.com/u/346399?v=4)](https://github.com/srtfisher "srtfisher (67 commits)")[![joemcgill](https://avatars.githubusercontent.com/u/801097?v=4)](https://github.com/joemcgill "joemcgill (28 commits)")[![renatonascalves](https://avatars.githubusercontent.com/u/19148962?v=4)](https://github.com/renatonascalves "renatonascalves (27 commits)")[![anubisthejackle](https://avatars.githubusercontent.com/u/1724534?v=4)](https://github.com/anubisthejackle "anubisthejackle (13 commits)")[![kevinfodness](https://avatars.githubusercontent.com/u/2650828?v=4)](https://github.com/kevinfodness "kevinfodness (4 commits)")[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (1 commits)")

---

Tags

wordpressphpcsstatic analysis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alleyinteractive-alley-coding-standards/health.svg)

```
[![Health](https://phpackages.com/badges/alleyinteractive-alley-coding-standards/health.svg)](https://phpackages.com/packages/alleyinteractive-alley-coding-standards)
```

###  Alternatives

[wp-coding-standards/wpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress coding conventions

2.8k42.5M1.6k](/packages/wp-coding-standards-wpcs)[escapestudios/symfony2-coding-standard

CodeSniffer ruleset for the Symfony 2+ coding standard

40611.1M275](/packages/escapestudios-symfony2-coding-standard)[symplify/easy-coding-standard

Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP\_CodeSniffer.

1.6k34.6M1.5k](/packages/symplify-easy-coding-standard)[phpcompatibility/phpcompatibility-wp

A ruleset for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.

22130.6M587](/packages/phpcompatibility-phpcompatibility-wp)[sirbrillig/phpcs-variable-analysis

A PHPCS sniff to detect problems with variables.

14548.5M97](/packages/sirbrillig-phpcs-variable-analysis)[phpstan/phpstan-strict-rules

Extra strict and opinionated rules for PHPStan

69661.6M3.9k](/packages/phpstan-phpstan-strict-rules)

PHPackages © 2026

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