This commit is contained in:
TomasVotruba 2020-07-27 07:48:40 +02:00
parent ff37f18963
commit a3a5266bf7
4 changed files with 9 additions and 7 deletions

View File

@ -6,10 +6,10 @@
.phpstorm.meta.php
phpstan.neon
rector.yaml
rector.php
phpunit.xml
ecs.yaml
ecs-after-rector.yaml
ecs.php
ecs-after-rector.php
changelog-linker.yaml
LICENSE

4
.gitattributes vendored
View File

@ -16,10 +16,10 @@
CODE_OF_CONDUCT.md export-ignore
easy-coding-standard.neon export-ignore
LICENSE export-ignore
ecs.yml export-ignore
ecs.php export-ignore
phpstan.neon export-ignore
phpunit.xml export-ignore
rector.yaml export-ignore
rector.php export-ignore
utils export-ignore
stubs export-ignore
compiler export-ignore

View File

@ -189,6 +189,7 @@ final class Application extends SymfonyApplication
private function getDefaultConfigPath(): string
{
// @todo update in Rector 0.8 to PHP
return getcwd() . '/rector.yaml';
}
}

View File

@ -40,8 +40,9 @@ final class RectorGuard
return;
}
// @todo @dx display nicer way instead of all red, as in https://github.com/symplify/symplify/blame/master/packages/easy-coding-standard/bin/ecs#L69-L83
throw new NoRectorsLoadedException(sprintf(
'We need some rectors to run:%s* register them in rector.yaml under "services:"%s* use "--set <set>"%s* or use "--config <file>.yaml"',
'We need some rectors to run:%s* register them in rector.php under "services():"%s* use "--set <set>"%s* or use "--config <file>.yaml"',
PHP_EOL,
PHP_EOL,
PHP_EOL
@ -57,7 +58,7 @@ final class RectorGuard
}
throw new InvalidRectorException(sprintf(
'Method "%s::getNodeTypes() provides invalid node class "%s". It must be child of "%s"',
'Method "%s::getNodeTypes()" provides invalid node class "%s". It must be child of "%s"',
get_class($phpRector),
$nodeTypeClass,
Node::class