madpilot78 / php-cs-fixer-config
Personal coding standards for the php cs fixer
Package info
codeberg.org/madpilot78/php-cs-fixer-config
pkg:composer/madpilot78/php-cs-fixer-config
1.2.1
2026-03-30 21:21 UTC
Requires
- php: ^7.3 || ^8.0
- php-cs-fixer/shim: ^3.17
Requires (Dev)
- ergebnis/composer-normalize: ^2.42
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Madpilot78 coding standards for PHP CS Fixer.
Based on Nexcloud Coding Standard.
Installation
Add the package to your dev dependencies
composer require --dev madpilot78/php-cs-fixer-config
and create a .php-cs-fixer.dist.php like
<?php
declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php';
use madpilot78\PhpCsFixerConfig\Config;
$config = new Config();
$config
$config
->setRules([ // Added to default ones
'@PHP82Migration' => true,
])
->getFinder()
->ignoreVCSIgnored(true)
->notPath('vendor')
->in(__DIR__);
return $config;
To run the fixer you first have to install it.
Then you can run php-cs-fixer fix to apply all automated fixes.
For convenience you may add it to the scripts section of your composer.json:
{
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix"
}
}
Note: Don't forget to exclude .php-cs-fixer.dist.php and .php-cs-fixer.cache
in your build scripts.