My PHP-CS-Fixer configuration

Maintainers

👁 jrmajor

Package info

github.com/jrmajor/php-cs

pkg:composer/jrmajor/cs

Statistics

Installs: 25 241

Dependents: 4

Suggesters: 0

Stars: 2

Open Issues: 1

v0.7.0 2025-12-07 12:08 UTC

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT ff008a1368a9005501a6ffbfea99592042597327

  • Jeremiasz Major <jrh.mjr.woop@gmail.com>

README

My personal PHP-CS-Fixer configuration, used in all of my PHP projects.

Install it via Composer: composer require jrmajor/cs and use Major\CS\config() function in .php-cs-fixer.php:

<?php

$finder = PhpCsFixer\Finder::create()
 ->in(__DIR__)
 ->notPath('bootstrap/cache')
 ->notPath('node_modules')
 ->notPath('storage')
 ->notName('*.blade.php')
 ->notName('_ide_helper*.php')
 ->ignoreVCSIgnored(true);

return Major\CS\config($finder, ['overwritten_rule' => false]);

Don't forget to add .php-cs-fixer.cache to .gitignore!