Skip to content

Nexus CS Config v3.3.0

Compare
Choose a tag to compare
@paulbalandan paulbalandan released this 31 Aug 13:50
v3.3.0
1fbec8d

Added 🔥

  • Support for custom fixers is added. This release contains two new fixers, SpaceAfterCommentStartFixer and NoCodeSeparatorCommentFixer
  • Added FixerGenerator to easily register all custom fixers in directory

To use the custom fixers in your ruleset, you just need two (2) steps:

  1. In the $options array, add the key customFixers with the value FixerGenerator::create('path/to/fixers', 'namespace').
  2. In the same array, add the key customRules with value of array of desired rules.

For example:

 $options = [
     'finder' => $finder,
+    'customFixers' => FixerGenerator::create('src/Fixer', 'Nexus\\CsConfig\\Fixer'),
+    'customRules' => [
+        \Nexus\CsConfig\Fixer\Comment\SpaceAfterCommentStartFixer::name() => true,
+        \Nexus\CsConfig\Fixer\Comment\NoCodeSeparatorCommentFixer::name() => true,
+    ],
 ];

Stay tuned for more custom fixers in future releases.

Changed ⚙️

  • Bump friendsofphp/php-cs-fixer version to v3.1.0 River to use latest fixers

Please refer to the CHANGELOG for the detailed list of changes.