Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tomas Vortuba:
How to Migrate From PHP CS Fixer to EasyCodingStandard in 6 Steps
Jun 12, 2018 @ 16:16:09

Continuing on in his series of migrating your PHP syntax checking over to the EasyCodingStandard, Tomas Vortuba has a new post showing how those currently using PHP CS Fixer can make the migration over to the new tool.

We looked at how to migrate from PHP_CodeSniffer to Easy Coding Standard on Monday. But what if your weapon of choice is PHP CS Fixer and you'd to run also some sniffs? There are a few simple A ? B changes, but one has to know about them or will get stuck.

ECS is a tool build on Symfony 3.4 components that combines PHP_CodeSniffer and PHP CS Fixer. [...] But what if you already have PHP CS Fixer on your project and want to switch?

He then lists out the six steps, giving a brief description of the change and any commands of code required:

  1. From String Codes to Autocompleted Classes
  2. From notPath() to skip Parameter
  3. From .php_cs to YML Config
  4. Configuring Fixer Values
  5. From no --dry-run to --fix option
  6. From @Rules to imports

You can find out more about the EasyCodingStandard on its GitHub repository.

tagged: migrate easycodingstandard steps phpcsfixer tutorial

Link: https://www.tomasvotruba.cz/blog/2018/06/07/how-to-migrate-from-php-cs-fixer-to-easy-coding-standard/


Trending Topics: