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:
- From String Codes to Autocompleted Classes
- From notPath() to skip Parameter
- From .php_cs to YML Config
- Configuring Fixer Values
- From no --dry-run to --fix option
- From @Rules to imports
You can find out more about the EasyCodingStandard on its GitHub repository.