fidry/php-cs-fixer-config

The PHP-CS-Fixer default config for my projects

Maintainers

👁 theofidry

Package info

github.com/theofidry/php-cs-fixer-config

pkg:composer/fidry/php-cs-fixer-config

Statistics

Installs: 14 099

Dependents: 1

Suggesters: 0

Stars: 6

Open Issues: 0

1.3.0 2026-01-10 22:09 UTC

Requires

  • php: ^7.2 || ^8.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

Replaces

None

MIT ba82d3b6d1858c1eebd943f56214493eb2d2292e

  • Théo FIDRY <theo.fidry.woop@gmail.com>

README

My personal PHP-CS-Fixer base configuration.

Installation

composer require --dev fidry/php-cs-fixer-config

Usage

<?php // php-cs-fixer.dist.php

declare(strict_types=1);

use Fidry\PhpCsFixerConfig\FidryConfig;
use PhpCsFixer\Finder;

$finder = // Configure Finder here as usual;

// Here use the specific config.
$config = new FidryConfig(
 // The header comment used
 <<<'EOF'
 This file is part of the Fidry PHP-CS-Fixer Config package.

 (c) Théo FIDRY <theo.fidry@gmail.com>

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.
 EOF,
 // The min PHP version supported (best to align with your composer.json)
 72000,
);

// You can further configure the $config here, to add or override some rules. 
$config->addRules([
 // ...
]);

return $config->setFinder($finder);