realodix / relax
Shared php-cs-fixer rules & finders preset
Installs: 52 580
Dependents: 4
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/realodix/relax
Requires
- php: ^7.4 || ^8.0
- friendsofphp/php-cs-fixer: ^3.88
- kubawerlos/php-cs-fixer-custom-fixers: ^3.35
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^9.6
- dev-main
- v1.21.0
- v1.20.2
- v1.20.1
- v1.20.0
- v1.19.0
- v1.18.0
- v1.17.1
- v1.17.0
- v1.16.0
- v1.15.0
- v1.14.0
- v1.13.1
- v1.13.0
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.0
- dev-remove-symfony/console
- dev-register_custom_rule_sets
This package is auto-updated.
Last update: 2026-02-15 18:07:19 UTC
README
Relax is built on top of PHP-CS-Fixer and makes it easy to provide a standardized way to apply coding standards across multiple projects, ensuring consistency and adherence to best practices.
By using predefined rulesets, it simplifies the setup process and allows teams to quickly integrate PHP-CS-Fixer into their development workflow.
Installation
You can install this package by using composer:
composer require --dev realodix/relax
Running
./vendor/bin/php-cs-fixer fix
Configuration
use Realodix\Relax\Config; return Config::this() ->setRules([ '@Realodix/Laravel' => true, ]);
or using the original PHP-CS-Fixer way
use PhpCsFixer\Config; use PhpCsFixer\Finder; $finder = (new Finder)->in(__DIR__); return (new Config) ->registerCustomRuleSets([ new \Realodix\Relax\Rulesets\Laravel, ]) ->setRules([ '@Realodix/Laravel' => true, ]) ->setFinder($finder) ;
# Rule Sets
-
@Realodix/Laravel-Realodix\Relax\Rulesets\LaravelRules that follow the official Laravel coding standards.
-
@Realodix/Relax-Realodix\Relax\Rulesets\RelaxLaravel based with a few tweaks.
# Finder Sets
By default, Relax will inspect all .php files in your project except those in the vendor directory.
| Method | Description |
|---|---|
Finder::base() |
The basic finder setup should be perfect for most PHP projects |
Finder::laravel() |
Inherits Finder::base() with some specific tweaks to Laravel |
💡 By default, if finder is not set Relax will use Finder::base().
Troubleshooting
For general help and support join our GitHub Discussions.
Please report bugs to the GitHub Issue Tracker.
License
This package is licensed under the MIT License.