PHPackages                             permafrost-dev/phpcsfixer-preset - 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. permafrost-dev/phpcsfixer-preset

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

permafrost-dev/phpcsfixer-preset
================================

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

2.0.1(4y ago)226.5k[1 PRs](https://github.com/permafrost-dev/phpcsfixer-preset/pulls)1MITPHPPHP ^7.3||^8.0

Since Oct 23Pushed 1y ago3 watchersCompare

[ Source](https://github.com/permafrost-dev/phpcsfixer-preset)[ Packagist](https://packagist.org/packages/permafrost-dev/phpcsfixer-preset)[ GitHub Sponsors](https://github.com/permafrost-dev)[ RSS](/packages/permafrost-dev-phpcsfixer-preset/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (36)Used By (1)

[![Permafrost Dev](https://camo.githubusercontent.com/150429a0939ae348ce3c630564c09a581da48c4cff138a02b0ff17014ca41107/68747470733a2f2f7374617469632e7065726d6166726f73742e6465762f696d616765732f706870637366697865722d7072657365742f706870637366697865722d7072657365742d6c6f676f2d30332e706e67)](https://camo.githubusercontent.com/150429a0939ae348ce3c630564c09a581da48c4cff138a02b0ff17014ca41107/68747470733a2f2f7374617469632e7065726d6166726f73742e6465762f696d616765732f706870637366697865722d7072657365742f706870637366697865722d7072657365742d6c6f676f2d30332e706e67)

phpcsfixer-preset

[![version](https://camo.githubusercontent.com/13f1977520e13dac0fc4cf213fdba9569470983d01b8c236e3fb0ad949d51f20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7065726d6166726f73742d6465762f706870637366697865722d707265736574)](https://camo.githubusercontent.com/13f1977520e13dac0fc4cf213fdba9569470983d01b8c236e3fb0ad949d51f20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7065726d6166726f73742d6465762f706870637366697865722d707265736574) [![license](https://camo.githubusercontent.com/bec90aaa0a91e69e538c50409f5fb13c431c716941078c4e4153fc24e2f5f5e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7065726d6166726f73742d6465762f706870637366697865722d707265736574)](https://camo.githubusercontent.com/bec90aaa0a91e69e538c50409f5fb13c431c716941078c4e4153fc24e2f5f5e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7065726d6166726f73742d6465762f706870637366697865722d707265736574) [![downloads](https://camo.githubusercontent.com/3c52d11e4a955a0f0dce1967544355618cce1f2d6579f779b804aa0e51babda9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7065726d6166726f73742d6465762f706870637366697865722d707265736574)](https://camo.githubusercontent.com/3c52d11e4a955a0f0dce1967544355618cce1f2d6579f779b804aa0e51babda9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7065726d6166726f73742d6465762f706870637366697865722d707265736574) [![Run Tests](https://camo.githubusercontent.com/28d6df451e618b82b582aca76f2c56934965177e927ef3921bfee8a205d5e18f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7065726d6166726f73742d6465762f706870637366697865722d7072657365742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e)](https://camo.githubusercontent.com/28d6df451e618b82b582aca76f2c56934965177e927ef3921bfee8a205d5e18f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7065726d6166726f73742d6465762f706870637366697865722d7072657365742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e) [![Coverage Status](https://camo.githubusercontent.com/b64353b9e575d88de5fd27e7c3dcaf3f31bf77bc785a1a918be74b3f90d93da5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7065726d6166726f73742d6465762f706870637366697865722d7072657365742f62616467652e7376673f6272616e63683d6d61696e)](https://camo.githubusercontent.com/b64353b9e575d88de5fd27e7c3dcaf3f31bf77bc785a1a918be74b3f90d93da5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7065726d6166726f73742d6465762f706870637366697865722d7072657365742f62616467652e7376673f6272616e63683d6d61696e)

---

This package allows sharing identical [php-cs-fixer](https://github.com/FriendsOfPhp/PHP-CS-Fixer) formatting rules across all of your projects without copy-and-pasting configuration files. There is also a quick setup script to automatically generate a configuration file for the project structure and preferred formatting preset.

`permafrost-dev/phpcsfixer-preset` provides several opinionated `php-cs-fixer` configuration choices as well as pre-configured `Finder` classes for common project formats and use cases.

Supported PHP versions are `7.3`, `7.4`, `8.0`, `8.1`, and `8.2`.

The original concept for this package came from this excellent article on [sharing php-cs-fixer configurations across projects](https://laravel-news.com/sharing-php-cs-fixer-rules-across-projects-and-teams) written by [Tim Mcdonald](https://timacdonald.me/).

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

[](#installation)

`composer require permafrost-dev/phpcsfixer-preset --dev`

---

Example `.php-cs-fixer.dist.php` files
--------------------------------------

[](#example-php-cs-fixerdistphp-files)

This example uses the Laravel project finder and the Default Ruleset:

```
