PHPackages                             php-forge/coding-standard - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-forge/coding-standard

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

php-forge/coding-standard
=========================

Coding standards for PHP projects.

0.1.0(3mo ago)247.4k↑11.6%15BSD-3-ClausePHPPHP &gt;=8.1CI passing

Since Jan 24Pushed 3mo agoCompare

[ Source](https://github.com/php-forge/coding-standard)[ Packagist](https://packagist.org/packages/php-forge/coding-standard)[ RSS](/packages/php-forge-coding-standard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (15)

 [ ![PHP Forge](https://avatars.githubusercontent.com/u/103309199?s%25253D400%252526u%25253Dca3561c692f53ed7eb290d3bb226a2828741606f%252526v%25253D4) ](https://github.com/php-forge/coding-standard)

Coding standard
===============

[](#coding-standard)

 **Centralized ECS and Rector configuration for PHP projects**
 *Share one set of rules across multiple repositories via Composer.*

Features
--------

[](#features)

  ![Feature Overview](./docs/svgs/features-mobile.svg)Installation
------------

[](#installation)

```
composer require php-forge/coding-standard:^0.1 --dev
```

Quick start
-----------

[](#quick-start)

This package provides shared configuration files under `vendor/php-forge/coding-standard/config/`:

- `config/ecs.php` (shared ECS rules, no paths)
- `config/rector.php` (shared Rector rules, no paths)

Consumer repositories should create wrapper config files at the repository root. Wrappers define the paths for that repository and import the shared configuration.

### Generic repository

[](#generic-repository)

#### ECS (ecs.php)

[](#ecs-ecsphp)

Create `ecs.php` in your repository root:

```
