Skip to content

Commit

Permalink
copy
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 14, 2024
1 parent 8e5880c commit d6b3c6d
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@
id: 111
title: "How to Migrate From PHP_CodeSniffer to ECS in 7 Steps"
perex: |
Last year, I helped [Shopsys Coding Standards](https://github.com/shopsys/coding-standards) and [LMC PHP Coding Standard](https://github.com/lmc-eu/php-coding-standard) to migrate from PHP_CodeSniffer to ECS.
Last year, I helped [Shopsys CS](https://github.com/shopsys/coding-standards) and [LMC CS](https://github.com/lmc-eu/php-coding-standard) to migrate from PHP_CodeSniffer to ECS.
There are a few simple A → B changes, but one has to know about them or will get stuck.
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.
Do you also use PHP_CodeSniffer and give it ECS a try? Today we look at how to migrate step by step.
updated_since: "January 2023"
updated_message: |
Updated with ECS 12 and `ECSConfig::configure()` simple way to work with configs.
---

ECS is a tool build on Symfony components that [combines PHP_CodeSniffer and PHP CS Fixer](/blog/2017/05/03/combine-power-of-php-code-sniffer-and-php-cs-fixer-in-3-lines/). It's easy to use from scratch:
ECS is a PHP CLI tool that [combines PHP_CodeSniffer and PHP CS Fixer](/blog/2017/05/03/combine-power-of-php-code-sniffer-and-php-cs-fixer-in-3-lines/). It's easy to use from scratch:

```bash
composer require symplify/easy-coding-standard --dev
```

ECS uses simple config:
ECS uses simple PHP config format:

```php
// ecs.php
Expand All @@ -38,7 +36,9 @@ And runs as CLI command:
vendor/bin/ecs
```

But what if you already have PHP_CodeSniffer on your project and want to switch?
<br>

Do you already have PHP_CodeSniffer on your project and want to switch? Let's jump right into it:

## 1. From String Codes to Autocompleted Classes

Expand Down

0 comments on commit d6b3c6d

Please sign in to comment.