PHPackages                             realodix/relax - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. realodix/relax

ActiveLibrary[Testing &amp; Quality](/categories/testing)

realodix/relax
==============

Shared php-cs-fixer rules &amp; finders preset

v1.22.0(3mo ago)357.5k↑614.2%4MITPHPPHP ^7.4 || ^8.0CI passing

Since Apr 23Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/realodix/relax)[ Packagist](https://packagist.org/packages/realodix/relax)[ Docs](https://github.com/realodix/relax)[ RSS](/packages/realodix-relax/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (8)Versions (36)Used By (4)

Relax - PHP-CS-Fixer Custom Rule Sets
=====================================

[](#relax---php-cs-fixer-custom-rule-sets)

[![PHPVersion](https://camo.githubusercontent.com/f69a1ca22b0c233753345f29fbfc2f3273102dbf4e0a2141ef94f323b0e12272/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e34253230253743253230253545382e302d3737374242342e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/f69a1ca22b0c233753345f29fbfc2f3273102dbf4e0a2141ef94f323b0e12272/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e34253230253743253230253545382e302d3737374242342e7376673f7374796c653d666c61742d737175617265)[![Packagist Version (custom server)](https://camo.githubusercontent.com/30c784250b27f7ac59154997f171674758b623f25726b0aa2a19e9421ebac725/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265616c6f6469782f72656c6178)](https://camo.githubusercontent.com/30c784250b27f7ac59154997f171674758b623f25726b0aa2a19e9421ebac725/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265616c6f6469782f72656c6178)[![Build Status](../../actions/workflows/ci.yml/badge.svg)](../../actions/workflows/ci.yml/badge.svg)

**Relax** is built on top of [`PHP-CS-Fixer`](https://github.com/PHP-CS-Fixer/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
------------

[](#installation)

You can install this package by using [composer](https://getcomposer.org/):

```
composer require --dev realodix/relax
```

Running
-------

[](#running)

```
./vendor/bin/php-cs-fixer fix
```

Configuration
-------------

[](#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

[](#-rule-sets)

- `@Realodix/Laravel` - `Realodix\Relax\Rulesets\Laravel`

    Rules that follow the official Laravel coding standards.
- `@Realodix/Relax` - `Realodix\Relax\Rulesets\Relax`

    Laravel based with a few tweaks.

### \# Finder Sets

[](#-finder-sets)

By default, Relax will inspect all `.php` files in your project except those in the `vendor` directory.

MethodDescription[`Finder::base()`](docs/finders.md#finderbase)The basic finder setup should be perfect for most PHP projects[`Finder::laravel()`](docs/finders.md#finderlaravel)Inherits `Finder::base()` with some specific tweaks to Laravel💡 By default, if finder is not set Relax will use `Finder::base()`.

Troubleshooting
---------------

[](#troubleshooting)

For general help and support join our [GitHub Discussions](../../discussions).

Please report bugs to the [GitHub Issue Tracker](../../issues).

License
-------

[](#license)

This package is licensed under the [MIT License](/LICENSE).

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance79

Regular maintenance activity

Popularity32

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Recently: every ~41 days

Total

35

Last Release

112d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.13.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/01bfff23a3bc54204b47bee797a13a438df9156915ad177258dbd1a9f110f5b7?d=identicon)[KeiJR](/maintainers/KeiJR)

---

Top Contributors

[![realodix](https://avatars.githubusercontent.com/u/1314456?v=4)](https://github.com/realodix "realodix (262 commits)")

---

Tags

code-standardscode-stylephp-cs-fixerphp-cs-fixer-configphp-cs-fixer-rulesetCode stylecoding-standardsphp-cs-fixercoding-styleCodestylephp-cs-fixer-config

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/realodix-relax/health.svg)

```
[![Health](https://phpackages.com/badges/realodix-relax/health.svg)](https://phpackages.com/packages/realodix-relax)
```

###  Alternatives

[ergebnis/php-cs-fixer-config

Provides a configuration factory and rule set factories for friendsofphp/php-cs-fixer.

703.0M205](/packages/ergebnis-php-cs-fixer-config)[erickskrauch/php-cs-fixer-custom-fixers

A set of custom fixers for PHP-CS-Fixer

302.4M30](/packages/erickskrauch-php-cs-fixer-custom-fixers)

PHPackages © 2026

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