PHPackages                             chromatix/phpcs-config-chromatix - 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. chromatix/phpcs-config-chromatix

ActiveLibrary[Testing &amp; Quality](/categories/testing)

chromatix/phpcs-config-chromatix
================================

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

v0.0.18(7y ago)115.3k[15 issues](https://github.com/ChromatixAU/phpcs-config-chromatix/issues)1MITPHP

Since Oct 23Pushed 3y ago3 watchersCompare

[ Source](https://github.com/ChromatixAU/phpcs-config-chromatix)[ Packagist](https://packagist.org/packages/chromatix/phpcs-config-chromatix)[ Docs](https://github.com/ChromatixAU/phpcs-config-chromatix)[ RSS](/packages/chromatix-phpcs-config-chromatix/feed)WikiDiscussions dev Synced 5d ago

READMEChangelog (10)Dependencies (1)Versions (23)Used By (1)

phpcs-config-chromatix
======================

[](#phpcs-config-chromatix)

Shareable config for [phpcs](https://www.squizlabs.com/php-codesniffer) for custom standards at [Chromatix Digital Agency](https://www.chromatix.com.au).

Based heavily on the [WordPress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) but with some of our own too. Most notably, two spaces instead of tabs. Soz.

**This config is still in development.** If you have suggestions for improvement or if you disagree with anything this config makes you do, feel free to file an issue.

***Writing PHP outside of the WordPress context?** We still use WordPress standards, but obviously without the need for using WordPress-specific functions. See [phpcs-config-chromatix-no-wordpress](https://github.com/ChromatixAU/phpcs-config-chromatix-no-wordpress).*

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

[](#installation)

Install globally to use on any project:

```
composer global require chromatix/phpcs-config-chromatix

```

Install locally to one project:

```
composer require chromatix/phpcs-config-chromatix

```

You'll also need to have [phpcs](https://www.squizlabs.com/php-codesniffer) installed in the same manner, and [set your phpcs `installed_paths`](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options#setting-the-installed-standard-paths) like follows:

```
vendor/bin/phpcs --config-set installed_paths ../../chromatix,../../wp-coding-standards/wpcs

```

It's probably ideal to do this in a [`post-install-cmd` script in your `composer.json`](https://getcomposer.org/doc/articles/scripts.md); see this package's [composer.json](composer.json) for an example of a cross-platform way to do so (it might look a bit complicated, but unfortunately is required... at least in our testing so far, anyway!).

Usage
-----

[](#usage)

Add this to your `phpcs.xml` file:

```

```

Then:

- **Using globally?**

    Run `phpcs *.php`
- **Using locally?**

    Run `vendor/bin/phpcs *.php`

    Alternatively, you'll probably find it useful to add a script to your `composer.json`:

    ```
    "scripts": {
      "lint": "find . -type d \\( -name '.git' -o -name 'vendor' -o -name 'node_modules' \\) -prune -o -type f -name '*.php' -print | xargs vendor/bin/phpcs"
    }

    ```

    Then you can just run `composer lint`.

See also
--------

[](#see-also)

- [phpcs-config-chromatix-no-wordpress](https://github.com/ChromatixAU/phpcs-config-chromatix-no-wordpress)
- [eslint-config-chromatix](https://github.com/ChromatixAU/eslint-config-chromatix)
- [stylelint-config-chromatix](https://github.com/ChromatixAU/stylelint-config-chromatix)

License
-------

[](#license)

[MIT](LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 65% 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 ~18 days

Recently: every ~63 days

Total

18

Last Release

2824d ago

### Community

Maintainers

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

---

Top Contributors

[![tdmalone](https://avatars.githubusercontent.com/u/900469?v=4)](https://github.com/tdmalone "tdmalone (13 commits)")[![amritcheema25](https://avatars.githubusercontent.com/u/32182882?v=4)](https://github.com/amritcheema25 "amritcheema25 (4 commits)")[![daviddeejjames](https://avatars.githubusercontent.com/u/5327212?v=4)](https://github.com/daviddeejjames "daviddeejjames (1 commits)")[![dylanvanes](https://avatars.githubusercontent.com/u/26612397?v=4)](https://github.com/dylanvanes "dylanvanes (1 commits)")[![jay-oswald](https://avatars.githubusercontent.com/u/16188552?v=4)](https://github.com/jay-oswald "jay-oswald (1 commits)")

---

Tags

chromatixphpphpcsphpcs-configwordpressphpphpcswordpressphpcs-configchromatix

### Embed Badge

![Health badge](/badges/chromatix-phpcs-config-chromatix/health.svg)

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

###  Alternatives

[wp-coding-standards/wpcs

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

2.7k42.5M1.6k](/packages/wp-coding-standards-wpcs)[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.

21830.6M587](/packages/phpcompatibility-phpcompatibility-wp)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[axepress/wp-graphql-cs

PHP\_CodeSniffer rules (sniffs) for the WPGraphQL ecosystem.

1060.9k7](/packages/axepress-wp-graphql-cs)[infinum/eightshift-coding-standards

Eightshift WordPress Coding Standards

1785.2k3](/packages/infinum-eightshift-coding-standards)

PHPackages © 2026

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