PHPackages                             paysera/lib-php-cs-fixer-config - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. paysera/lib-php-cs-fixer-config

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

paysera/lib-php-cs-fixer-config
===============================

PHP CS Fixer config for Paysera conventions

3.0.3(1y ago)1034.6k↓38.9%19[3 issues](https://github.com/paysera/lib-php-cs-fixer-config/issues)[5 PRs](https://github.com/paysera/lib-php-cs-fixer-config/pulls)5PHPPHP &gt;=7.4 &lt;8.0 || &gt;=8.1

Since Aug 8Pushed 1y ago7 watchersCompare

[ Source](https://github.com/paysera/lib-php-cs-fixer-config)[ Packagist](https://packagist.org/packages/paysera/lib-php-cs-fixer-config)[ RSS](/packages/paysera-lib-php-cs-fixer-config/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (47)Used By (5)

lib-php-cs-fixer-config [![](https://camo.githubusercontent.com/da12edc68683de7c1f52355e06efe874945f2c07222cb3a77a5574481a9c01da/68747470733a2f2f7472617669732d63692e6f72672f706179736572612f6c69622d7068702d63732d66697865722d636f6e6669672e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/da12edc68683de7c1f52355e06efe874945f2c07222cb3a77a5574481a9c01da/68747470733a2f2f7472617669732d63692e6f72672f706179736572612f6c69622d7068702d63732d66697865722d636f6e6669672e7376673f6272616e63683d6d6173746572)
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#lib-php-cs-fixer-config-)

Library helps to fix PHP code to conform [Paysera PHP style guide](https://github.com/paysera/php-style-guide).

Installation
------------

[](#installation)

### Prerequisite

[](#prerequisite)

- Add `Paysera\\PhpCsFixerConfig\\Composer\\PhpCsFixerConfigProvider::copyPhpCs` script to `post-install-cmd` and `post-update-cmd`or other `scripts` - just make sure this script is executed on `composer install`.

### Install and check

[](#install-and-check)

- `composer require --dev paysera/lib-php-cs-fixer-config`.
- Make sure `php-cs-fixer.php` file is in project directory.

No need to install php-cs-fixer itself as this library comes with binary version of the fixer. This avoids requiring its dependencies inside your project, which could clash with existing ones.

To avoid duplication with php-cs-fixer library, it's named `paysera-php-cs-fixer`.

##### php-cs-fixer.php files

[](#php-cs-fixerphp-files)

- `php-cs-fixer.php` - all Paysera recommended fixers.
- `php-cs-fixer-risky.php` - all risky fixers except recommendations (comment warnings).
- `php-cs-fixer-safe.php` - all non risky fixers.

### Migration mode

[](#migration-mode)

For new projects you can just use all the rules as usual.

For existing projects we recommend turning on the migration mode:

1. Add call to `enableMigrationMode([])` to `PayseraConventionsConfig` instance in your `php-cs-fixer.php` file.
2. Run `{your-bin-dir}/php-cs-fixer` - it will give error with initial rule configuration to pass into that method. Just copy-and-paste it to your `php-cs-fixer.php` file.
3. Enable one of the rules, apply fixes in the project, review and test them.
4. Repeat with each new rule.

This allows to control which rules are enabled in the project thus letting manually tune the fixes already applied in the repository and forced for the new code. Also, your commits will be more focused as each of them will include only changes from a single fixer.

All rules are to be configured to allow easily spotting new rules in case they would be added (or removed) into the core.

### Running fixer with tests

[](#running-fixer-with-tests)

For comments or suggestions for developers you should use default `php-cs-fixer.php` file with all the rules.

For automatic checks there might be some false-positives so `php-cs-fixer-risky.php` should be used in such cases.

You can look at `.travis.yml` file in this repository for integration with travis on each pull request of your repository (this will run the checks only for changed files).

Usage
-----

[](#usage)

Run in project directory by command: `{your-bin-dir}/php-cs-fixer fix /path/to/code --verbose --dry-run --diff`

Use `--config=php-cs-fixer.php` flag for custom configuration.

If `/path/to/code` is not defined `php-cs-fixer` will run files from default `src` directory excluding `Test` folders.

`--verbose` - show the applied rules. When using the txt format it will also display progress notifications.

A combination of `--dry-run` and `--diff` will display a summary of proposed fixes, leaving your files unchanged.

`--format` option for the output format. Supported formats are `txt` (default one), `json`, `xml` and `junit`.

More information: [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community28

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~50 days

Total

42

Last Release

495d ago

Major Versions

1.7.6 → 2.0.02018-10-10

2.5.2 → 3.0.02024-08-13

PHP version history (5 changes)1.0.0PHP ^5.5 || ^7.0

1.1.0PHP ^7.0

2.5.0PHP ^7.0 || ^8.2

2.5.1PHP &gt;=7.4

3.0.1PHP &gt;=7.4 &lt;8.0 || &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d385187c2b529d5c1189dfc3763972f76738d24293593ff3db876fff82321db?d=identicon)[paysera.com](/maintainers/paysera.com)

---

Top Contributors

[![viktorkulahin](https://avatars.githubusercontent.com/u/168184740?v=4)](https://github.com/viktorkulahin "viktorkulahin (56 commits)")[![mariusbalcytis](https://avatars.githubusercontent.com/u/1590072?v=4)](https://github.com/mariusbalcytis "mariusbalcytis (48 commits)")[![mSprunskas](https://avatars.githubusercontent.com/u/4427922?v=4)](https://github.com/mSprunskas "mSprunskas (9 commits)")[![artem-yakymchuk-paysera](https://avatars.githubusercontent.com/u/131874317?v=4)](https://github.com/artem-yakymchuk-paysera "artem-yakymchuk-paysera (8 commits)")[![borilyordanov](https://avatars.githubusercontent.com/u/11679283?v=4)](https://github.com/borilyordanov "borilyordanov (3 commits)")[![vbartusevicius](https://avatars.githubusercontent.com/u/7325630?v=4)](https://github.com/vbartusevicius "vbartusevicius (2 commits)")[![boyanpaysera](https://avatars.githubusercontent.com/u/69149143?v=4)](https://github.com/boyanpaysera "boyanpaysera (1 commits)")[![rokas-simonavicius](https://avatars.githubusercontent.com/u/127475909?v=4)](https://github.com/rokas-simonavicius "rokas-simonavicius (1 commits)")[![zalnora](https://avatars.githubusercontent.com/u/40488494?v=4)](https://github.com/zalnora "zalnora (1 commits)")

---

Tags

activebackendoss-librarypackagist

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/paysera-lib-php-cs-fixer-config/health.svg)

```
[![Health](https://phpackages.com/badges/paysera-lib-php-cs-fixer-config/health.svg)](https://phpackages.com/packages/paysera-lib-php-cs-fixer-config)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[illuminate/support

The Illuminate Support package.

630113.0M41.3k](/packages/illuminate-support)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k51.2M339](/packages/api-platform-core)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k118.7M719](/packages/symfony-maker-bundle)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.0M219](/packages/api-platform-metadata)

PHPackages © 2026

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