Redefining Configuration

We’re excited ship the ability for you to configure the coding style rules you’d like us to use on your project. We’ve set up what we think is a sensible default, designed to make your code so beautiful you could lick it.

What is this magnificent creation you ask? Starting with immediate effect, we’re reading .styleci.yml files committed to the root your projects. These allow you to choose a preset from our selection of handpicked fixers, and additionally enable or disable any fixers to totally match your taste.

Our current presets are psr1, psr2, symfony, and recommended. If you don’t include a .styleci.yml file in your project, we’ll assume you want our recommended preset.

Feast your eyes on this configuration file:

preset: recommended

  - strict
  - strict_param 

  - short_array_syntax

That's how you'd lay out one of these fancy configuration files. In this particular example, we've chosen to go with the recommended preset, enable the strict and strict_param fixes on top of the recommended set and we've also chosen to disable short_array_syntax.

Here's a list of all the available fixers: [Show]
In the recommended preset: [Show]
In the psr1 preset: [Show]
In the psr2 preset: [Show]
In the symfony preset: [Show]

For documentation on any of the fixers, visit the PHP-CS-Fixer repo.

Share Comment on Twitter