Skip to content

Commit

Permalink
use exclude as list
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Nov 22, 2019
1 parent cea8403 commit a3693df
Show file tree
Hide file tree
Showing 30 changed files with 86 additions and 31 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"jetbrains/phpstorm-stubs": "^2019.2",
"ocramius/package-versions": "^1.5",
"ocramius/package-versions": "^1.4|^1.5",
"phpunit/phpunit": "^7.5|^8.4",
"symplify/changelog-linker": "^6.1",
"symplify/easy-coding-standard": "^6.1",
Expand Down
13 changes: 12 additions & 1 deletion config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ services:

Rector\:
resource: '../src'
exclude: '../src/{Node/Attribute.php,Rector/**/*Rector.php,Reporting/FileDiff.php,Testing/PHPUnit,RectorDefinition,PhpParser/Node/*Info.php,Exception/*,DependencyInjection/CompilerPass/*,DependencyInjection/Loader/*,Application/Error.php,HttpKernel/RectorKernel.php,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/Reporting/FileDiff.php'
- '../src/Testing/PHPUnit/*'
- '../src/RectorDefinition/*'
- '../src/PhpParser/Node/*Info.php'
- '../src/Exception/*'
- '../src/DependencyInjection/CompilerPass/*'
- '../src/DependencyInjection/Loader/*'
- '../src/Application/Error.php'
- '../src/HttpKernel/RectorKernel.php'
- '../src/ValueObject/*'

# extra services
Rector\Symfony\Rector\Form\Helper\FormTypeStringToTypeProvider: ~
Expand Down
3 changes: 2 additions & 1 deletion packages/Architecture/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\Architecture\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
4 changes: 3 additions & 1 deletion packages/Autodiscovery/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ services:

Rector\Autodiscovery\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/ValueObject/*'
7 changes: 6 additions & 1 deletion packages/BetterPhpDocParser/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ services:

Rector\BetterPhpDocParser\:
resource: '../src'
exclude: '../src/{ValueObject/*,*/*Info.php,*Info.php,Attributes/Ast/PhpDoc/*,PhpDocNode/*}'
exclude:
- '../src/ValueObject/*'
- '../src/*/*Info.php'
- '../src/*Info.php'
- '../src/Attributes/Ast/PhpDoc/*'
- '../src/PhpDocNode/*'

PHPStan\PhpDocParser\Lexer\Lexer: ~
PHPStan\PhpDocParser\Parser\TypeParser: ~
Expand Down
3 changes: 2 additions & 1 deletion packages/CodingStyle/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\CodingStyle\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
4 changes: 3 additions & 1 deletion packages/DeadCode/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ services:

Rector\DeadCode\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,Data/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/Data/*'
3 changes: 2 additions & 1 deletion packages/Doctrine/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ services:

Rector\Doctrine\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'

Rector\Doctrine\Contract\Mapper\DoctrineEntityAndRepositoryMapperInterface:
alias: 'Rector\Doctrine\Mapper\DefaultDoctrineEntityAndRepositoryMapper'
3 changes: 2 additions & 1 deletion packages/DynamicTypeAnalysis/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\DynamicTypeAnalysis\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/ElasticSearchDSL/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\ElasticSearchDSL\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/FileSystemRector/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\FileSystemRector\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/Legacy/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\Legacy\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/NetteTesterToPHPUnit/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\NetteTesterToPHPUnit\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
5 changes: 4 additions & 1 deletion packages/NetteToSymfony/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ services:

Rector\NetteToSymfony\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,Route/RouteInfo.php,Event/EventInfo.php,Rector/*,PhpDocParser/Ast/PhpDoc/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/Route/RouteInfo.php'
- '../src/Event/EventInfo.php'
6 changes: 4 additions & 2 deletions packages/NodeTypeResolver/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ services:

Rector\NodeTypeResolver\:
resource: '../src'
# "Type" is because the file is needed for PHPStan container only
exclude: '../src/{Contract,Php/*Info.php,PHPStanOverride/*,Type}'
exclude:
- '../src/Contract'
# "Type" is because the file is needed for PHPStan container only
- '../src/Type'

Rector\Php\TypeAnalyzer: ~
Rector\FileSystem\FilesFinder: ~
Expand Down
4 changes: 3 additions & 1 deletion packages/PHPUnit/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ services:

Rector\PHPUnit\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/ValueObject/*'
4 changes: 3 additions & 1 deletion packages/PSR4/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ services:

Rector\PSR4\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/ValueObject/*'
4 changes: 3 additions & 1 deletion packages/Php70/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ services:

Rector\Php70\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,Exception/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/Exception/*'
3 changes: 2 additions & 1 deletion packages/Php71/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\Php71\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/PhpSpecToPHPUnit/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\PhpSpecToPHPUnit\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/RemovingStatic/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\RemovingStatic\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/SOLID/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\SOLID\:
resource: '../src/'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
3 changes: 2 additions & 1 deletion packages/Sensio/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\Sensio\:
resource: '../src/'
exclude: '../src/{Rector/**/*Rector.php,PhpDocParser/Ast/PhpDoc/*}'
exclude:
- '../src/Rector/**/*Rector.php'
4 changes: 3 additions & 1 deletion packages/Symfony/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ services:

Rector\Symfony\:
resource: '../src/'
exclude: '../src/{Rector/**/*Rector.php,PhpDocParser/Ast/PhpDoc/*,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/PhpDocParser/Ast/PhpDoc/*'
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function process(ContainerBuilder $containerBuilder): void
}
});

$containerBuilder->compile();
$containerBuilder->compile(true);

// solves "You have requested a synthetic service ("kernel"). The DIC does not know how to construct this service"
$containerBuilder->set('kernel', $kernel);
Expand Down
3 changes: 2 additions & 1 deletion packages/SymfonyPHPUnit/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:

Rector\SymfonyPHPUnit\:
resource: '../src/'
exclude: '../src/{Rector/**/*Rector.php}'
exclude:
- '../src/Rector/**/*Rector.php'
5 changes: 4 additions & 1 deletion packages/TypeDeclaration/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ services:

Rector\TypeDeclaration\:
resource: '../src/'
exclude: '../src/{Rector/**/*Rector.php,Exception,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/Exception/*'
- '../src/ValueObject/*'
4 changes: 3 additions & 1 deletion packages/ZendToSymfony/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ services:

Rector\ZendToSymfony\:
resource: '../src'
exclude: '../src/{Rector/**/*Rector.php,ValueObject/*}'
exclude:
- '../src/Rector/**/*Rector.php'
- '../src/ValueObject/*'
3 changes: 2 additions & 1 deletion utils/DocumentationGenerator/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ services:

Rector\Utils\DocumentationGenerator\:
resource: '../src'
exclude: '../src/ValueObject/*'
exclude:
- '../src/ValueObject/*'
4 changes: 3 additions & 1 deletion utils/RectorGenerator/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ services:

Rector\Utils\RectorGenerator\:
resource: '../src'
exclude: '../src/{Exception/*,ValueObject/*}'
exclude:
- '../src/Exception/*'
- '../src/ValueObject/*'

0 comments on commit a3693df

Please sign in to comment.