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

Thomas Vortuba:
How to Migrate From PHP_CodeSniffer to EasyCodingStandard in 7 Steps
Jun 05, 2018 @ 15:43:15

Thomas Vortuba has a new tutorial posted to his site showing how to easily switch from PHP_CdeSniffer to EasyCodingStandard for enforcing the structure and syntax of your PHP application's code.

Last year, I helped Shopsys Coding Standards and LMC PHP Coding Standard to migrate from PHP_CodeSniffer to EasyCodingStandard.

There are a few simple A ? B changes, but one has to know about them or will get stuck.

Do you also use PHP_CodeSniffer and give it EasyCodingStandard a try? Today we look at how to migrate step by step.

The post then walks you through the five-step process and lists out the major changes:

  1. From String Codes to Autocompleted Classes
  2. From @codingStandardsIgnoreStart to skip Parameter
  3. From 0 and to skip Parameter
  4. From XML to YML Config Paths
  5. Configuring Sniff Values
  6. From Severity and Warning to Just Errors
  7. From Beautifier to --fix option

Each step includes either the command required, the configuration changes to make or code examples of the refactor to help illustrate the changes.

tagged: migrate phpcodesniffer easycodingstandard codingstandard syntax tutorial

Link: https://www.tomasvotruba.cz/blog/2018/06/04/how-to-migrate-from-php-code-sniffer-to-easy-coding-standard/


Trending Topics: