mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-21 16:02:23 +02:00
drop ecs-after-rector, recommend current setup (#4944)
This commit is contained in:
parent
cfcb237612
commit
a3db386854
@ -9,8 +9,7 @@ phpstan.neon
|
||||
rector.php
|
||||
phpunit.xml
|
||||
ecs.php
|
||||
ecs-after-rector.php
|
||||
changelog-linker.yaml
|
||||
changelog-linker.php
|
||||
|
||||
LICENSE
|
||||
|
||||
|
@ -259,4 +259,4 @@ Do you use Rector to upgrade your code? Add it here:
|
||||
|
||||
Rector uses [nikic/php-parser](https://github.com/nikic/PHP-Parser/), built on technology called an *abstract syntax tree* (AST). An AST doesn't know about spaces and when written to a file it produces poorly formatted code in both PHP and docblock annotations. **That's why your project needs to have a coding standard tool** and a set of formatting rules, so it can make Rector's output code nice and shiny again.
|
||||
|
||||
Don't have a coding standard tool? Add [ECS](https://github.com/Symplify/EasyCodingStandard) and use prepared [`ecs-after-rector.php`](/ecs-after-rector.php) set.
|
||||
We're using [ECS](https://github.com/symplify/easy-coding-standard) with [this setup](ecs.php).
|
||||
|
@ -1,30 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
|
||||
use PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer;
|
||||
use PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer;
|
||||
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
|
||||
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
|
||||
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
|
||||
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
|
||||
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$services->set(NoUnusedImportsFixer::class);
|
||||
$services->set(OrderedImportsFixer::class);
|
||||
$services->set(NoLeadingImportSlashFixer::class);
|
||||
$services->set(NoTrailingWhitespaceInCommentFixer::class);
|
||||
$services->set(NoEmptyPhpdocFixer::class);
|
||||
$services->set(ClassAttributesSeparationFixer::class);
|
||||
$services->set(DeclareStrictTypesFixer::class);
|
||||
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
|
||||
$parameters->set(Option::SETS, [
|
||||
SetList::DOCTRINE_ANNOTATIONS,
|
||||
]);
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user