PHPackages                             enabel/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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. enabel/coding-standard

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

enabel/coding-standard
======================

Initialize coding standards configuration for PHP/Symfony projects

v1.2.1(1mo ago)0143↓100%MITPHPPHP &gt;=8.3CI passing

Since Feb 25Pushed 1mo agoCompare

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

READMEChangelog (4)Dependencies (3)Versions (7)Used By (0)

Enabel Coding Standard
======================

[](#enabel-coding-standard)

A CLI tool to initialize coding standards configuration for PHP/Symfony projects. Generates ready-to-use configuration files for code quality tools, CI/CD pipelines, and development environments.

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

[](#installation)

```
composer require enabel/coding-standard --dev
```

Usage
-----

[](#usage)

### Interactive Mode

[](#interactive-mode)

Run the init command without options for interactive configuration:

```
vendor/bin/coding-standard init
```

You'll be prompted to configure:

- Project name and PHP version
- Symfony version (if applicable)
- Database type and version (MariaDB, MySQL, PostgreSQL)
- Code quality tools (PHP-CS-Fixer, PHPStan, Rector, PHPUnit)
- CI provider (GitLab CI, GitHub Actions, Azure DevOps)
- Development environment (Symfony CLI, Docker Compose, Local PHP)

### Non-Interactive Mode

[](#non-interactive-mode)

Use CLI options for automated setup:

```
vendor/bin/coding-standard init \
    --project-name=my-project \
    --php-version=8.4 \
    --symfony=8.0 \
    --database=postgresql \
    --database-version=17 \
    --ci=gitlab \
    --no-interaction
```

### CLI Options

[](#cli-options)

OptionDescriptionDefault`--project-name`Project nameCurrent directory name`--php-version`PHP version (8.3, 8.4, 8.5)8.4`--symfony`Symfony version (7.4, 8.0) or "no"no`--database`Database type (mariadb, mysql, postgresql)-`--database-version`Database version-`--ci`CI provider (gitlab, github, azure, none)none`--php-cs-fixer` / `--no-php-cs-fixer`Include PHP-CS-Fixeryes`--phpstan` / `--no-phpstan`Include PHPStanyes`--phpstan-level`PHPStan level (6-9 or max)max`--rector` / `--no-rector`Include Rectoryes`--phpunit` / `--no-phpunit`Include PHPUnit configyes`--dev-env`Development environment (symfony-cli, docker, local)symfony-cli`--makefile` / `--no-makefile`Include Makefileyes`--src-path`Source directory pathsrc`--tests-path`Tests directory pathtests`--force`Overwrite existing filesno`--skip-existing`Skip existing filesno`--output-dir`Output directory.Generated Files
---------------

[](#generated-files)

### Code Quality Tools

[](#code-quality-tools)

FileDescription`.php-cs-fixer.dist.php`PHP-CS-Fixer configuration`phpstan.neon`PHPStan configuration`rector.php`Rector configuration`phpunit.dist.xml`PHPUnit configuration`tools/php-cs-fixer/composer.json`Isolated PHP-CS-Fixer dependencies`tools/phpstan/composer.json`Isolated PHPStan dependencies`tools/rector/composer.json`Isolated Rector dependencies### CI/CD Pipelines

[](#cicd-pipelines)

FileDescription`.gitlab-ci.yml`GitLab CI pipeline`.github/workflows/ci.yml`GitHub Actions workflow`azure-pipelines.yml`Azure DevOps pipeline### Development Environment

[](#development-environment)

FileDescription`compose.yaml`Docker Compose services`compose.override.yaml`Docker Compose local overrides`Dockerfile`PHP container (docker env only)`Makefile`Development commands`composer-scripts.json`Composer scripts configurationDatabase Support
----------------

[](#database-support)

The following databases are supported with their recent versions:

DatabaseVersionsMariaDB11.4, 10.11, 10.6MySQL8.4, 8.0, 5.7PostgreSQL17, 16, 15When a database is configured:

- CI pipelines include a database service container
- Correct PHP extensions are installed (pdo\_mysql or pdo\_pgsql)
- DATABASE\_URL is configured for Doctrine

Post-Installation
-----------------

[](#post-installation)

After running `init`:

### 1. Install Tool Dependencies

[](#1-install-tool-dependencies)

```
composer install -d tools/php-cs-fixer
composer install -d tools/phpstan
composer install -d tools/rector
```

Or use the Makefile:

```
make install
```

### 2. Configure Database Connection (Symfony projects)

[](#2-configure-database-connection-symfony-projects)

If you configured a database, you need to set the `DATABASE_URL` environment variable in your `.env.local` file:

**MariaDB:**

```
DATABASE_URL="mysql://user:password@127.0.0.1:3306/my_database?serverVersion=11.4-MariaDB"
```

**MySQL:**

```
DATABASE_URL="mysql://user:password@127.0.0.1:3306/my_database?serverVersion=8.4"
```

**PostgreSQL:**

```
DATABASE_URL="postgresql://user:password@127.0.0.1:5432/my_database?serverVersion=17&charset=utf8"
```

> **Note:** The CI pipelines are pre-configured with test database credentials. The `DATABASE_URL` in CI uses `db` as the database name because Symfony automatically appends `_test` suffix in test environment.

Available Make Commands
-----------------------

[](#available-make-commands)

CommandDescription`make help`Show available commands`make install`Install all dependencies`make lint`Run all linters`make analyze`Run static analysis`make test`Run tests`make ci`Run full CI pipeline`make csf`Check code style`make csf-fix`Fix code style`make stan`Run PHPStan`make rector`Check Rector (dry-run)`make rector-fix`Apply Rector fixesLicense
-------

[](#license)

MIT

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance95

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Total

5

Last Release

56d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24548b753089898f260dfce842f29e7abbeaf606e95ee59b75b1b2f8818c7e4d?d=identicon)[damienlagae](/maintainers/damienlagae)

---

Top Contributors

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

---

Tags

PHPStandockercoding-standardsrectorphp-cs-fixerGithub Actionsgitlab-ci

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/enabel-coding-standard/health.svg)

```
[![Health](https://phpackages.com/badges/enabel-coding-standard/health.svg)](https://phpackages.com/packages/enabel-coding-standard)
```

###  Alternatives

[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M262](/packages/ssch-typo3-rector)[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.2k](/packages/drevops-git-artifact)[thecodeholic/laravel-hostinger-deploy

Laravel package for automated Hostinger deployment with GitHub Actions support

565.3k](/packages/thecodeholic-laravel-hostinger-deploy)[beechit/json-to-code-climate-subset-converter

CLI tool that'll convert supported JSON files to a subset of the Code Climate JSON format.

1936.6k](/packages/beechit-json-to-code-climate-subset-converter)

PHPackages © 2026

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