diff --git a/.dockerignore b/.dockerignore index fb2fe248991..3abd450ad7e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -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 diff --git a/.gitattributes b/.gitattributes index 10c1af64f84..f2f2e874526 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/src/Console/Application.php b/src/Console/Application.php index 59384dd8b86..eceb091a334 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -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'; } } diff --git a/src/Guard/RectorGuard.php b/src/Guard/RectorGuard.php index 04b2f689c24..377e0906b9f 100644 --- a/src/Guard/RectorGuard.php +++ b/src/Guard/RectorGuard.php @@ -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 "%s* or use "--config .yaml"', + 'We need some rectors to run:%s* register them in rector.php under "services():"%s* use "--set "%s* or use "--config .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