From 0db2b07d4969cf989bcce4cdbcbd6a1f4a72dbdc Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 3 Feb 2019 18:46:45 +0100 Subject: [PATCH] rename *.yml to *.yaml --- .gitattributes | 4 ++-- .gitignore | 6 +++--- Dockerfile | 2 +- README.md | 10 +++++----- bin/clean_trailing_spaces.sh | 2 +- config/config.yaml | 8 ++++++++ config/config.yml | 8 -------- ... => action-injection-to-constructor-injection.yaml} | 0 ...service.yml => doctrine-repository-as-service.yaml} | 0 config/level/cakephp/{cakephp34.yml => cakephp34.yaml} | 0 config/level/cakephp/{cakephp35.yml => cakephp35.yaml} | 0 config/level/cakephp/{cakephp36.yml => cakephp36.yaml} | 0 config/level/cakephp/{cakephp37.yml => cakephp37.yaml} | 0 .../{code-quality.yml => code-quality.yaml} | 0 .../{coding-style.yml => coding-style.yaml} | 0 .../level/dead-code/{dead-code.yml => dead-code.yaml} | 0 .../level/doctrine/{doctrine25.yml => doctrine25.yaml} | 0 ...asy-admin-bundle20.yml => easy-admin-bundle20.yaml} | 0 config/level/guzzle/{guzzle50.yml => guzzle50.yaml} | 0 .../nikic/{php-parser40.yml => php-parser40.yaml} | 0 ...{php-code-sniffer30.yml => php-code-sniffer30.yaml} | 0 .../php/{mysql_to_mysqli.yml => mysql_to_mysqli.yaml} | 0 config/level/php/{php53.yml => php53.yaml} | 0 config/level/php/{php54.yml => php54.yaml} | 0 config/level/php/{php56.yml => php56.yaml} | 0 config/level/php/{php70.yml => php70.yaml} | 2 +- config/level/php/{php71.yml => php71.yaml} | 0 config/level/php/{php72.yml => php72.yaml} | 0 config/level/php/{php73.yml => php73.yaml} | 0 config/level/php/{php74.yml => php74.yaml} | 0 config/level/phpstan/{phpstan.yml => phpstan.yaml} | 0 .../phpunit/{phpunit-mock.yml => phpunit-mock.yaml} | 0 ...pecific-method.yml => phpunit-specific-method.yaml} | 0 ...a-provider.yml => phpunit-yield-data-provider.yaml} | 0 config/level/phpunit/{phpunit60.yml => phpunit60.yaml} | 0 config/level/phpunit/{phpunit70.yml => phpunit70.yaml} | 0 config/level/phpunit/{phpunit80.yml => phpunit80.yaml} | 0 ...ra-bundle-30.yml => framework-extra-bundle-30.yaml} | 0 ...ra-bundle-50.yml => framework-extra-bundle-50.yaml} | 0 .../{silverstripe.yml => silverstripe.yaml} | 0 config/level/sylius/{sylius10.yml => sylius10.yaml} | 0 config/level/sylius/{sylius102.yml => sylius102.yaml} | 0 config/level/sylius/{sylius109.yml => sylius109.yaml} | 0 ...njection.yml => symfony-constructor-injection.yaml} | 0 config/level/symfony/{symfony26.yml => symfony26.yaml} | 0 config/level/symfony/{symfony28.yml => symfony28.yaml} | 0 config/level/symfony/{symfony30.yml => symfony30.yaml} | 0 config/level/symfony/{symfony31.yml => symfony31.yaml} | 0 config/level/symfony/{symfony32.yml => symfony32.yaml} | 0 config/level/symfony/{symfony33.yml => symfony33.yaml} | 0 config/level/symfony/{symfony34.yml => symfony34.yaml} | 0 config/level/symfony/{symfony40.yml => symfony40.yaml} | 0 config/level/symfony/{symfony41.yml => symfony41.yaml} | 0 config/level/symfony/{symfony42.yml => symfony42.yaml} | 0 config/level/twig/{twig112.yml => twig112.yaml} | 0 config/level/twig/{twig127.yml => twig127.yaml} | 0 config/level/twig/{twig134.yml => twig134.yaml} | 0 config/level/twig/{twig140.yml => twig140.yaml} | 2 +- config/level/twig/{twig20.yml => twig20.yaml} | 0 config/level/twig/{twig240.yml => twig240.yaml} | 2 +- ...e-to-namespace.yml => underscore-to-namespace.yaml} | 0 config/{services.yml => services.yaml} | 0 create-rector.yml.dist => create-rector.yaml.dist | 2 +- docs/HowItWorks.md | 4 ++-- docs/HowToCreateOwnRector.md | 6 +++--- .../ConsoleDiffer/config/{config.yml => config.yaml} | 0 .../config/{config.yml => config.yaml} | 0 .../src/Command/CreateRectorCommand.php | 2 +- .../src/Configuration/ConfigurationFactory.php | 2 +- .../config/{config.yml => config.yaml} | 0 .../level/{jsm-decouple.yml => jsm-decouple.yaml} | 0 .../JmsInjectAnnotationRectorTest.php | 2 +- .../{config.yml => config.yaml} | 0 .../NetteToSymfony/config/{config.yml => config.yaml} | 0 .../config/{config.yml => config.yaml} | 0 packages/Php/config/{config.yml => config.yaml} | 0 packages/Php/src/EregToPcreTransformer.php | 2 +- packages/Php/tests/Rector/Each/EachRectorTest.php | 2 +- .../Php/tests/Rector/Each/{config.yml => config.yaml} | 0 .../{config.yml => config.yaml} | 0 .../ReturnTypeDeclarationRector/Php72RectorTest.php | 2 +- .../{config_php72.yml => config_php72.yaml} | 0 packages/Sensio/config/{config.yml => config.yaml} | 0 packages/Symfony/config/{config.yml => config.yaml} | 0 .../Symfony/src/Bridge/SymfonyKernelParameterGuard.php | 2 +- .../ContainerGetToConstructorInjectionRectorTest.php | 2 +- .../{config.yml => config.yaml} | 0 .../GetToConstructorInjectionRectorTest.php | 2 +- ...alidConfigurationConstructorInjectionRectorTest.php | 2 +- ...alidConfigurationConstructorInjectionRectorTest.php | 2 +- ...alidConfigurationConstructorInjectionRectorTest.php | 2 +- .../{config.yml => config.yaml} | 0 .../{invalid-config-2.yml => invalid-config-2.yaml} | 0 .../{invalid-config-3.yml => invalid-config-3.yaml} | 0 src/CodingStyle/AfterRectorCodingStyle.php | 2 +- src/Console/Application.php | 2 +- src/DependencyInjection/RectorKernel.php | 2 +- src/Guard/RectorGuard.php | 2 +- .../FilesFinder/ExcludePaths/ExcludePathsTest.php | 2 +- ...luded-paths.yml => config-with-excluded-paths.yaml} | 0 tests/Issues/Issue835/Issue835Test.php | 2 +- tests/Issues/Issue835/config/config835.yaml | 3 +++ tests/Issues/Issue835/config/config835.yml | 3 --- ...ActionInjectionToConstructorInjectionRectorTest.php | 2 +- .../{config.yml => config.yaml} | 0 .../DoctrineRepositoryAsServiceTest.php | 2 +- .../{config.yml => config.yaml} | 2 +- .../NewObjectToFactoryCreateRectorTest.php | 2 +- .../{config.yml => config.yaml} | 4 ++-- .../ReturnThisRemoveRectorTest.php | 2 +- .../ReturnThisRemoveRector/{config.yml => config.yaml} | 0 .../MultipleClassFileToPsr4ClassesRectorTest.php | 2 +- .../{config.yml => config.yaml} | 0 tests/Rector/RectorOrder/RectorOrderTest.php | 2 +- tests/Rector/RectorOrder/{config.yml => config.yaml} | 0 115 files changed, 59 insertions(+), 59 deletions(-) create mode 100644 config/config.yaml delete mode 100644 config/config.yml rename config/level/architecture/{action-injection-to-constructor-injection.yml => action-injection-to-constructor-injection.yaml} (100%) rename config/level/architecture/{doctrine-repository-as-service.yml => doctrine-repository-as-service.yaml} (100%) rename config/level/cakephp/{cakephp34.yml => cakephp34.yaml} (100%) rename config/level/cakephp/{cakephp35.yml => cakephp35.yaml} (100%) rename config/level/cakephp/{cakephp36.yml => cakephp36.yaml} (100%) rename config/level/cakephp/{cakephp37.yml => cakephp37.yaml} (100%) rename config/level/code-quality/{code-quality.yml => code-quality.yaml} (100%) rename config/level/coding-style/{coding-style.yml => coding-style.yaml} (100%) rename config/level/dead-code/{dead-code.yml => dead-code.yaml} (100%) rename config/level/doctrine/{doctrine25.yml => doctrine25.yaml} (100%) rename config/level/easy-corp/{easy-admin-bundle20.yml => easy-admin-bundle20.yaml} (100%) rename config/level/guzzle/{guzzle50.yml => guzzle50.yaml} (100%) rename config/level/nikic/{php-parser40.yml => php-parser40.yaml} (100%) rename config/level/php-code-sniffer/{php-code-sniffer30.yml => php-code-sniffer30.yaml} (100%) rename config/level/php/{mysql_to_mysqli.yml => mysql_to_mysqli.yaml} (100%) rename config/level/php/{php53.yml => php53.yaml} (100%) rename config/level/php/{php54.yml => php54.yaml} (100%) rename config/level/php/{php56.yml => php56.yaml} (100%) rename config/level/php/{php70.yml => php70.yaml} (95%) rename config/level/php/{php71.yml => php71.yaml} (100%) rename config/level/php/{php72.yml => php72.yaml} (100%) rename config/level/php/{php73.yml => php73.yaml} (100%) rename config/level/php/{php74.yml => php74.yaml} (100%) rename config/level/phpstan/{phpstan.yml => phpstan.yaml} (100%) rename config/level/phpunit/{phpunit-mock.yml => phpunit-mock.yaml} (100%) rename config/level/phpunit/{phpunit-specific-method.yml => phpunit-specific-method.yaml} (100%) rename config/level/phpunit/{phpunit-yield-data-provider.yml => phpunit-yield-data-provider.yaml} (100%) rename config/level/phpunit/{phpunit60.yml => phpunit60.yaml} (100%) rename config/level/phpunit/{phpunit70.yml => phpunit70.yaml} (100%) rename config/level/phpunit/{phpunit80.yml => phpunit80.yaml} (100%) rename config/level/sensio/{framework-extra-bundle-30.yml => framework-extra-bundle-30.yaml} (100%) rename config/level/sensio/{framework-extra-bundle-50.yml => framework-extra-bundle-50.yaml} (100%) rename config/level/silverstripe/{silverstripe.yml => silverstripe.yaml} (100%) rename config/level/sylius/{sylius10.yml => sylius10.yaml} (100%) rename config/level/sylius/{sylius102.yml => sylius102.yaml} (100%) rename config/level/sylius/{sylius109.yml => sylius109.yaml} (100%) rename config/level/symfony/{symfony-constructor-injection.yml => symfony-constructor-injection.yaml} (100%) rename config/level/symfony/{symfony26.yml => symfony26.yaml} (100%) rename config/level/symfony/{symfony28.yml => symfony28.yaml} (100%) rename config/level/symfony/{symfony30.yml => symfony30.yaml} (100%) rename config/level/symfony/{symfony31.yml => symfony31.yaml} (100%) rename config/level/symfony/{symfony32.yml => symfony32.yaml} (100%) rename config/level/symfony/{symfony33.yml => symfony33.yaml} (100%) rename config/level/symfony/{symfony34.yml => symfony34.yaml} (100%) rename config/level/symfony/{symfony40.yml => symfony40.yaml} (100%) rename config/level/symfony/{symfony41.yml => symfony41.yaml} (100%) rename config/level/symfony/{symfony42.yml => symfony42.yaml} (100%) rename config/level/twig/{twig112.yml => twig112.yaml} (100%) rename config/level/twig/{twig127.yml => twig127.yaml} (100%) rename config/level/twig/{twig134.yml => twig134.yaml} (100%) rename config/level/twig/{twig140.yml => twig140.yaml} (55%) rename config/level/twig/{twig20.yml => twig20.yaml} (100%) rename config/level/twig/{twig240.yml => twig240.yaml} (55%) rename config/level/twig/{underscore-to-namespace.yml => underscore-to-namespace.yaml} (100%) rename config/{services.yml => services.yaml} (100%) rename create-rector.yml.dist => create-rector.yaml.dist (88%) rename packages/ConsoleDiffer/config/{config.yml => config.yaml} (100%) rename packages/ContributorTools/config/{config.yml => config.yaml} (100%) rename packages/FileSystemRector/config/{config.yml => config.yaml} (100%) rename packages/Jms/config/level/{jsm-decouple.yml => jsm-decouple.yaml} (100%) rename packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/{config.yml => config.yaml} (100%) rename packages/NetteToSymfony/config/{config.yml => config.yaml} (100%) rename packages/NodeTypeResolver/config/{config.yml => config.yaml} (100%) rename packages/Php/config/{config.yml => config.yaml} (100%) rename packages/Php/tests/Rector/Each/{config.yml => config.yaml} (100%) rename packages/Php/tests/Rector/FuncCall/RemoveExtraParametersRector/{config.yml => config.yaml} (100%) rename packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/{config_php72.yml => config_php72.yaml} (100%) rename packages/Sensio/config/{config.yml => config.yaml} (100%) rename packages/Symfony/config/{config.yml => config.yaml} (100%) rename packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/{config.yml => config.yaml} (100%) rename packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/{config.yml => config.yaml} (100%) rename packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/{invalid-config-2.yml => invalid-config-2.yaml} (100%) rename packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/{invalid-config-3.yml => invalid-config-3.yaml} (100%) rename tests/FileSystem/FilesFinder/ExcludePaths/config/{config-with-excluded-paths.yml => config-with-excluded-paths.yaml} (100%) create mode 100644 tests/Issues/Issue835/config/config835.yaml delete mode 100644 tests/Issues/Issue835/config/config835.yml rename tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/{config.yml => config.yaml} (100%) rename tests/Rector/Architecture/DoctrineRepositoryAsService/{config.yml => config.yaml} (90%) rename tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/{config.yml => config.yaml} (55%) rename tests/Rector/MethodBody/ReturnThisRemoveRector/{config.yml => config.yaml} (100%) rename tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/{config.yml => config.yaml} (100%) rename tests/Rector/RectorOrder/{config.yml => config.yaml} (100%) diff --git a/.gitattributes b/.gitattributes index ec9a1b6deae..28bdd071c8a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,5 +21,5 @@ LICENSE export-ignore ecs.yml export-ignore phpstan.neon export-ignore phpunit.xml export-ignore -create-rector.yml.dist export-ignore -rector.yml export-ignore +create-rector.yaml.dist export-ignore +rector.yaml export-ignore diff --git a/.gitignore b/.gitignore index 1a7686c260a..097377c1289 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/rector.yml +/rector.yaml /temp !/temp/.gitkeep /example @@ -8,10 +8,10 @@ composer.lock .idea/ /demo -rector-symfony.yml + .phpunit.result.cache # often customized locally - example on Github is just fine -create-rector.yml +create-rector.yaml phpstan-dependencies.json phpstan-paths.txt diff --git a/Dockerfile b/Dockerfile index 3770b3803c8..f69994a1ae0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,6 @@ WORKDIR /rector COPY . /rector COPY --from=composer /app . -CMD ["bin/rector", "process", "/project", "--dry-run", "--config", "/project/rector.yml"] +CMD ["bin/rector", "process", "/project", "--dry-run", "--config", "/project/rector.yaml"] # TODO: dev with xdebug extension for local development \ No newline at end of file diff --git a/README.md b/README.md index 5fcad556d44..c30adcd1ac9 100644 --- a/README.md +++ b/README.md @@ -63,10 +63,10 @@ Rector relies on project and autoloading of its classes. To specify own autoload vendor/bin/rector process ../project --autoload-file ../project/vendor/autoload.php ``` -Or make use of `rector.yml` config: +Or make use of `rector.yaml` config: ```yaml -# rector.yml +# rector.yaml parameters: autoload_paths: - 'vendor/squizlabs/php_codesniffer/autoload.php' @@ -78,7 +78,7 @@ parameters: You can also **exclude files or directories** (with regex or [fnmatch](http://php.net/manual/en/function.fnmatch.php)): ```yaml -# rector.yml +# rector.yaml parameters: exclude_paths: - '*/src/*/Tests/*' @@ -87,7 +87,7 @@ parameters: Do you want to use whole set, except that one rule? Exclude it: ```yaml -# rector.yml +# rector.yaml parameters: exclude_rectors: - 'Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector' @@ -123,7 +123,7 @@ vendor/bin/rector process "src/Symfony/Component/*/Tests" --level phpunit60 --dr ### B. Custom Sets -1. Create `rector.yml` with desired Rectors: +1. Create `rector.yaml` with desired Rectors: ```yaml services: diff --git a/bin/clean_trailing_spaces.sh b/bin/clean_trailing_spaces.sh index 3d09a86a4a3..6b811c5ed8a 100755 --- a/bin/clean_trailing_spaces.sh +++ b/bin/clean_trailing_spaces.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash # trailing whitespaces -sed -i -E 's#\s+$##g' config/level/*/*.yml docs/*.md README.md +sed -i -E 's#\s+$##g' config/level/*/*.yaml docs/*.md README.md diff --git a/config/config.yaml b/config/config.yaml new file mode 100644 index 00000000000..4e3612478a4 --- /dev/null +++ b/config/config.yaml @@ -0,0 +1,8 @@ +imports: + - { resource: '../packages/**/config/config.yaml' } + - { resource: 'services.yaml' } + +parameters: + exclude_paths: [] + exclude_rectors: [] + autoload_paths: [] diff --git a/config/config.yml b/config/config.yml deleted file mode 100644 index c6fafeb9f00..00000000000 --- a/config/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -imports: - - { resource: '../packages/**/config/config.yml' } - - { resource: 'services.yml' } - -parameters: - exclude_paths: [] - exclude_rectors: [] - autoload_paths: [] diff --git a/config/level/architecture/action-injection-to-constructor-injection.yml b/config/level/architecture/action-injection-to-constructor-injection.yaml similarity index 100% rename from config/level/architecture/action-injection-to-constructor-injection.yml rename to config/level/architecture/action-injection-to-constructor-injection.yaml diff --git a/config/level/architecture/doctrine-repository-as-service.yml b/config/level/architecture/doctrine-repository-as-service.yaml similarity index 100% rename from config/level/architecture/doctrine-repository-as-service.yml rename to config/level/architecture/doctrine-repository-as-service.yaml diff --git a/config/level/cakephp/cakephp34.yml b/config/level/cakephp/cakephp34.yaml similarity index 100% rename from config/level/cakephp/cakephp34.yml rename to config/level/cakephp/cakephp34.yaml diff --git a/config/level/cakephp/cakephp35.yml b/config/level/cakephp/cakephp35.yaml similarity index 100% rename from config/level/cakephp/cakephp35.yml rename to config/level/cakephp/cakephp35.yaml diff --git a/config/level/cakephp/cakephp36.yml b/config/level/cakephp/cakephp36.yaml similarity index 100% rename from config/level/cakephp/cakephp36.yml rename to config/level/cakephp/cakephp36.yaml diff --git a/config/level/cakephp/cakephp37.yml b/config/level/cakephp/cakephp37.yaml similarity index 100% rename from config/level/cakephp/cakephp37.yml rename to config/level/cakephp/cakephp37.yaml diff --git a/config/level/code-quality/code-quality.yml b/config/level/code-quality/code-quality.yaml similarity index 100% rename from config/level/code-quality/code-quality.yml rename to config/level/code-quality/code-quality.yaml diff --git a/config/level/coding-style/coding-style.yml b/config/level/coding-style/coding-style.yaml similarity index 100% rename from config/level/coding-style/coding-style.yml rename to config/level/coding-style/coding-style.yaml diff --git a/config/level/dead-code/dead-code.yml b/config/level/dead-code/dead-code.yaml similarity index 100% rename from config/level/dead-code/dead-code.yml rename to config/level/dead-code/dead-code.yaml diff --git a/config/level/doctrine/doctrine25.yml b/config/level/doctrine/doctrine25.yaml similarity index 100% rename from config/level/doctrine/doctrine25.yml rename to config/level/doctrine/doctrine25.yaml diff --git a/config/level/easy-corp/easy-admin-bundle20.yml b/config/level/easy-corp/easy-admin-bundle20.yaml similarity index 100% rename from config/level/easy-corp/easy-admin-bundle20.yml rename to config/level/easy-corp/easy-admin-bundle20.yaml diff --git a/config/level/guzzle/guzzle50.yml b/config/level/guzzle/guzzle50.yaml similarity index 100% rename from config/level/guzzle/guzzle50.yml rename to config/level/guzzle/guzzle50.yaml diff --git a/config/level/nikic/php-parser40.yml b/config/level/nikic/php-parser40.yaml similarity index 100% rename from config/level/nikic/php-parser40.yml rename to config/level/nikic/php-parser40.yaml diff --git a/config/level/php-code-sniffer/php-code-sniffer30.yml b/config/level/php-code-sniffer/php-code-sniffer30.yaml similarity index 100% rename from config/level/php-code-sniffer/php-code-sniffer30.yml rename to config/level/php-code-sniffer/php-code-sniffer30.yaml diff --git a/config/level/php/mysql_to_mysqli.yml b/config/level/php/mysql_to_mysqli.yaml similarity index 100% rename from config/level/php/mysql_to_mysqli.yml rename to config/level/php/mysql_to_mysqli.yaml diff --git a/config/level/php/php53.yml b/config/level/php/php53.yaml similarity index 100% rename from config/level/php/php53.yml rename to config/level/php/php53.yaml diff --git a/config/level/php/php54.yml b/config/level/php/php54.yaml similarity index 100% rename from config/level/php/php54.yml rename to config/level/php/php54.yaml diff --git a/config/level/php/php56.yml b/config/level/php/php56.yaml similarity index 100% rename from config/level/php/php56.yml rename to config/level/php/php56.yaml diff --git a/config/level/php/php70.yml b/config/level/php/php70.yaml similarity index 95% rename from config/level/php/php70.yml rename to config/level/php/php70.yaml index 5b98958633e..2ca7a6ad20f 100644 --- a/config/level/php/php70.yml +++ b/config/level/php/php70.yaml @@ -1,5 +1,5 @@ imports: - - { resource: "mysql_to_mysqli.yml" } + - { resource: "mysql_to_mysqli.yaml" } services: Rector\Php\Rector\FunctionLike\Php4ConstructorRector: ~ diff --git a/config/level/php/php71.yml b/config/level/php/php71.yaml similarity index 100% rename from config/level/php/php71.yml rename to config/level/php/php71.yaml diff --git a/config/level/php/php72.yml b/config/level/php/php72.yaml similarity index 100% rename from config/level/php/php72.yml rename to config/level/php/php72.yaml diff --git a/config/level/php/php73.yml b/config/level/php/php73.yaml similarity index 100% rename from config/level/php/php73.yml rename to config/level/php/php73.yaml diff --git a/config/level/php/php74.yml b/config/level/php/php74.yaml similarity index 100% rename from config/level/php/php74.yml rename to config/level/php/php74.yaml diff --git a/config/level/phpstan/phpstan.yml b/config/level/phpstan/phpstan.yaml similarity index 100% rename from config/level/phpstan/phpstan.yml rename to config/level/phpstan/phpstan.yaml diff --git a/config/level/phpunit/phpunit-mock.yml b/config/level/phpunit/phpunit-mock.yaml similarity index 100% rename from config/level/phpunit/phpunit-mock.yml rename to config/level/phpunit/phpunit-mock.yaml diff --git a/config/level/phpunit/phpunit-specific-method.yml b/config/level/phpunit/phpunit-specific-method.yaml similarity index 100% rename from config/level/phpunit/phpunit-specific-method.yml rename to config/level/phpunit/phpunit-specific-method.yaml diff --git a/config/level/phpunit/phpunit-yield-data-provider.yml b/config/level/phpunit/phpunit-yield-data-provider.yaml similarity index 100% rename from config/level/phpunit/phpunit-yield-data-provider.yml rename to config/level/phpunit/phpunit-yield-data-provider.yaml diff --git a/config/level/phpunit/phpunit60.yml b/config/level/phpunit/phpunit60.yaml similarity index 100% rename from config/level/phpunit/phpunit60.yml rename to config/level/phpunit/phpunit60.yaml diff --git a/config/level/phpunit/phpunit70.yml b/config/level/phpunit/phpunit70.yaml similarity index 100% rename from config/level/phpunit/phpunit70.yml rename to config/level/phpunit/phpunit70.yaml diff --git a/config/level/phpunit/phpunit80.yml b/config/level/phpunit/phpunit80.yaml similarity index 100% rename from config/level/phpunit/phpunit80.yml rename to config/level/phpunit/phpunit80.yaml diff --git a/config/level/sensio/framework-extra-bundle-30.yml b/config/level/sensio/framework-extra-bundle-30.yaml similarity index 100% rename from config/level/sensio/framework-extra-bundle-30.yml rename to config/level/sensio/framework-extra-bundle-30.yaml diff --git a/config/level/sensio/framework-extra-bundle-50.yml b/config/level/sensio/framework-extra-bundle-50.yaml similarity index 100% rename from config/level/sensio/framework-extra-bundle-50.yml rename to config/level/sensio/framework-extra-bundle-50.yaml diff --git a/config/level/silverstripe/silverstripe.yml b/config/level/silverstripe/silverstripe.yaml similarity index 100% rename from config/level/silverstripe/silverstripe.yml rename to config/level/silverstripe/silverstripe.yaml diff --git a/config/level/sylius/sylius10.yml b/config/level/sylius/sylius10.yaml similarity index 100% rename from config/level/sylius/sylius10.yml rename to config/level/sylius/sylius10.yaml diff --git a/config/level/sylius/sylius102.yml b/config/level/sylius/sylius102.yaml similarity index 100% rename from config/level/sylius/sylius102.yml rename to config/level/sylius/sylius102.yaml diff --git a/config/level/sylius/sylius109.yml b/config/level/sylius/sylius109.yaml similarity index 100% rename from config/level/sylius/sylius109.yml rename to config/level/sylius/sylius109.yaml diff --git a/config/level/symfony/symfony-constructor-injection.yml b/config/level/symfony/symfony-constructor-injection.yaml similarity index 100% rename from config/level/symfony/symfony-constructor-injection.yml rename to config/level/symfony/symfony-constructor-injection.yaml diff --git a/config/level/symfony/symfony26.yml b/config/level/symfony/symfony26.yaml similarity index 100% rename from config/level/symfony/symfony26.yml rename to config/level/symfony/symfony26.yaml diff --git a/config/level/symfony/symfony28.yml b/config/level/symfony/symfony28.yaml similarity index 100% rename from config/level/symfony/symfony28.yml rename to config/level/symfony/symfony28.yaml diff --git a/config/level/symfony/symfony30.yml b/config/level/symfony/symfony30.yaml similarity index 100% rename from config/level/symfony/symfony30.yml rename to config/level/symfony/symfony30.yaml diff --git a/config/level/symfony/symfony31.yml b/config/level/symfony/symfony31.yaml similarity index 100% rename from config/level/symfony/symfony31.yml rename to config/level/symfony/symfony31.yaml diff --git a/config/level/symfony/symfony32.yml b/config/level/symfony/symfony32.yaml similarity index 100% rename from config/level/symfony/symfony32.yml rename to config/level/symfony/symfony32.yaml diff --git a/config/level/symfony/symfony33.yml b/config/level/symfony/symfony33.yaml similarity index 100% rename from config/level/symfony/symfony33.yml rename to config/level/symfony/symfony33.yaml diff --git a/config/level/symfony/symfony34.yml b/config/level/symfony/symfony34.yaml similarity index 100% rename from config/level/symfony/symfony34.yml rename to config/level/symfony/symfony34.yaml diff --git a/config/level/symfony/symfony40.yml b/config/level/symfony/symfony40.yaml similarity index 100% rename from config/level/symfony/symfony40.yml rename to config/level/symfony/symfony40.yaml diff --git a/config/level/symfony/symfony41.yml b/config/level/symfony/symfony41.yaml similarity index 100% rename from config/level/symfony/symfony41.yml rename to config/level/symfony/symfony41.yaml diff --git a/config/level/symfony/symfony42.yml b/config/level/symfony/symfony42.yaml similarity index 100% rename from config/level/symfony/symfony42.yml rename to config/level/symfony/symfony42.yaml diff --git a/config/level/twig/twig112.yml b/config/level/twig/twig112.yaml similarity index 100% rename from config/level/twig/twig112.yml rename to config/level/twig/twig112.yaml diff --git a/config/level/twig/twig127.yml b/config/level/twig/twig127.yaml similarity index 100% rename from config/level/twig/twig127.yml rename to config/level/twig/twig127.yaml diff --git a/config/level/twig/twig134.yml b/config/level/twig/twig134.yaml similarity index 100% rename from config/level/twig/twig134.yml rename to config/level/twig/twig134.yaml diff --git a/config/level/twig/twig140.yml b/config/level/twig/twig140.yaml similarity index 55% rename from config/level/twig/twig140.yml rename to config/level/twig/twig140.yaml index ae47d7dc0fe..069f34c4943 100644 --- a/config/level/twig/twig140.yml +++ b/config/level/twig/twig140.yaml @@ -1,3 +1,3 @@ imports: # underscore naming to namespaced classes changes - - { resource: 'underscore-to-namespace.yml' } + - { resource: 'underscore-to-namespace.yaml' } diff --git a/config/level/twig/twig20.yml b/config/level/twig/twig20.yaml similarity index 100% rename from config/level/twig/twig20.yml rename to config/level/twig/twig20.yaml diff --git a/config/level/twig/twig240.yml b/config/level/twig/twig240.yaml similarity index 55% rename from config/level/twig/twig240.yml rename to config/level/twig/twig240.yaml index ae47d7dc0fe..069f34c4943 100644 --- a/config/level/twig/twig240.yml +++ b/config/level/twig/twig240.yaml @@ -1,3 +1,3 @@ imports: # underscore naming to namespaced classes changes - - { resource: 'underscore-to-namespace.yml' } + - { resource: 'underscore-to-namespace.yaml' } diff --git a/config/level/twig/underscore-to-namespace.yml b/config/level/twig/underscore-to-namespace.yaml similarity index 100% rename from config/level/twig/underscore-to-namespace.yml rename to config/level/twig/underscore-to-namespace.yaml diff --git a/config/services.yml b/config/services.yaml similarity index 100% rename from config/services.yml rename to config/services.yaml diff --git a/create-rector.yml.dist b/create-rector.yaml.dist similarity index 88% rename from create-rector.yml.dist rename to create-rector.yaml.dist index 489e2aa00aa..07341f2c725 100644 --- a/create-rector.yml.dist +++ b/create-rector.yaml.dist @@ -28,4 +28,4 @@ code_after: | source: # e.g. link to RFC or headline in upgrade guide, 1 or more in the list - "" -level: "" # e.g. symfony30.yml, target config to append this rector to +level: "" # e.g. symfony30.yaml, target config to append this rector to diff --git a/docs/HowItWorks.md b/docs/HowItWorks.md index 7c8e54cc512..abd1bb7d1c2 100644 --- a/docs/HowItWorks.md +++ b/docs/HowItWorks.md @@ -4,7 +4,7 @@ ## 1. Finds all files and Load Configured Rectors -- The application finds files in source you provide and registeres Rectors - from `--level`, `--config` or local `rector.yml` +- The application finds files in source you provide and registeres Rectors - from `--level`, `--config` or local `rector.yaml` - Then it iterates all found files and applies relevant Rectors to them. - *Rector* in this context is 1 single class that modifies 1 thing, e.g. changes class name @@ -59,7 +59,7 @@ E.g. in this case, first will be changed `@expectedException` annotation to meth then a method `setExpectedException` to `expectedException`. ```yaml -# rector.yml +# rector.yaml services: Rector\PHPUnit\Rector\ExceptionAnnotationRector: ~ diff --git a/docs/HowToCreateOwnRector.md b/docs/HowToCreateOwnRector.md index 5007d941bde..2167d024575 100644 --- a/docs/HowToCreateOwnRector.md +++ b/docs/HowToCreateOwnRector.md @@ -97,7 +97,7 @@ final class MyFirstRector extends AbstractRector } ``` -## 3. Register it `rector.yml` +## 3. Register it `rector.yaml` ```diff services: @@ -113,10 +113,10 @@ vendor/bin/rector process src --dry-run vendor/bin/rector process src ``` -If you use `rector.yml` from another directory or another name, set it with `--config` option: +If you use `rector.yaml` from another directory or another name, set it with `--config` option: ```bash -vendor/bin/rector process src --config ../custom-rector.yml +vendor/bin/rector process src --config ../custom-rector.yaml ``` That's it! diff --git a/packages/ConsoleDiffer/config/config.yml b/packages/ConsoleDiffer/config/config.yaml similarity index 100% rename from packages/ConsoleDiffer/config/config.yml rename to packages/ConsoleDiffer/config/config.yaml diff --git a/packages/ContributorTools/config/config.yml b/packages/ContributorTools/config/config.yaml similarity index 100% rename from packages/ContributorTools/config/config.yml rename to packages/ContributorTools/config/config.yaml diff --git a/packages/ContributorTools/src/Command/CreateRectorCommand.php b/packages/ContributorTools/src/Command/CreateRectorCommand.php index ccb6e27e396..67a722d9b6e 100644 --- a/packages/ContributorTools/src/Command/CreateRectorCommand.php +++ b/packages/ContributorTools/src/Command/CreateRectorCommand.php @@ -81,7 +81,7 @@ final class CreateRectorCommand extends Command implements ContributorCommandInt protected function execute(InputInterface $input, OutputInterface $output): int { - $configuration = $this->configurationFactory->createFromConfigFile(getcwd() . '/create-rector.yml'); + $configuration = $this->configurationFactory->createFromConfigFile(getcwd() . '/create-rector.yaml'); $templateVariables = $this->templateVariablesFactory->createFromConfiguration($configuration); foreach ($this->findTemplateFileInfos() as $smartFileInfo) { diff --git a/packages/ContributorTools/src/Configuration/ConfigurationFactory.php b/packages/ContributorTools/src/Configuration/ConfigurationFactory.php index 00937ba234b..0fd360394f1 100644 --- a/packages/ContributorTools/src/Configuration/ConfigurationFactory.php +++ b/packages/ContributorTools/src/Configuration/ConfigurationFactory.php @@ -133,7 +133,7 @@ final class ConfigurationFactory $finder = Finder::create()->files() ->in($this->levelsDirectory) - ->name(sprintf('#%s(\.yml)?$#', $level)); + ->name(sprintf('#%s(\.yaml)?$#', $level)); /** @var SplFileInfo[] $fileInfos */ $fileInfos = iterator_to_array($finder->getIterator()); diff --git a/packages/FileSystemRector/config/config.yml b/packages/FileSystemRector/config/config.yaml similarity index 100% rename from packages/FileSystemRector/config/config.yml rename to packages/FileSystemRector/config/config.yaml diff --git a/packages/Jms/config/level/jsm-decouple.yml b/packages/Jms/config/level/jsm-decouple.yaml similarity index 100% rename from packages/Jms/config/level/jsm-decouple.yml rename to packages/Jms/config/level/jsm-decouple.yaml diff --git a/packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/JmsInjectAnnotationRectorTest.php b/packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/JmsInjectAnnotationRectorTest.php index 84c4c9abc43..3a5de61a061 100644 --- a/packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/JmsInjectAnnotationRectorTest.php +++ b/packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/JmsInjectAnnotationRectorTest.php @@ -19,6 +19,6 @@ final class JmsInjectAnnotationRectorTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/config.yml b/packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/config.yaml similarity index 100% rename from packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/config.yml rename to packages/Jms/tests/Rector/Property/JmsInjectAnnotationRector/config.yaml diff --git a/packages/NetteToSymfony/config/config.yml b/packages/NetteToSymfony/config/config.yaml similarity index 100% rename from packages/NetteToSymfony/config/config.yml rename to packages/NetteToSymfony/config/config.yaml diff --git a/packages/NodeTypeResolver/config/config.yml b/packages/NodeTypeResolver/config/config.yaml similarity index 100% rename from packages/NodeTypeResolver/config/config.yml rename to packages/NodeTypeResolver/config/config.yaml diff --git a/packages/Php/config/config.yml b/packages/Php/config/config.yaml similarity index 100% rename from packages/Php/config/config.yml rename to packages/Php/config/config.yaml diff --git a/packages/Php/src/EregToPcreTransformer.php b/packages/Php/src/EregToPcreTransformer.php index c0565e1ae8b..01de4941313 100644 --- a/packages/Php/src/EregToPcreTransformer.php +++ b/packages/Php/src/EregToPcreTransformer.php @@ -17,7 +17,7 @@ final class EregToPcreTransformer private $pcreDelimiter; /** - * Change this via services configuratoin in rector.yml if you need it + * Change this via services configuratoin in rector.yaml if you need it * Single type is chosen to prevent every regular with different delimiter. */ public function __construct(string $pcreDelimiter = '#') diff --git a/packages/Php/tests/Rector/Each/EachRectorTest.php b/packages/Php/tests/Rector/Each/EachRectorTest.php index 0c42a35b8b8..0305a1e52d3 100644 --- a/packages/Php/tests/Rector/Each/EachRectorTest.php +++ b/packages/Php/tests/Rector/Each/EachRectorTest.php @@ -25,6 +25,6 @@ final class EachRectorTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/packages/Php/tests/Rector/Each/config.yml b/packages/Php/tests/Rector/Each/config.yaml similarity index 100% rename from packages/Php/tests/Rector/Each/config.yml rename to packages/Php/tests/Rector/Each/config.yaml diff --git a/packages/Php/tests/Rector/FuncCall/RemoveExtraParametersRector/config.yml b/packages/Php/tests/Rector/FuncCall/RemoveExtraParametersRector/config.yaml similarity index 100% rename from packages/Php/tests/Rector/FuncCall/RemoveExtraParametersRector/config.yml rename to packages/Php/tests/Rector/FuncCall/RemoveExtraParametersRector/config.yaml diff --git a/packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/Php72RectorTest.php b/packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/Php72RectorTest.php index 800ab6616a4..c890df4a2d9 100644 --- a/packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/Php72RectorTest.php +++ b/packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/Php72RectorTest.php @@ -16,6 +16,6 @@ final class Php72RectorTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config_php72.yml'; + return __DIR__ . '/config_php72.yaml'; } } diff --git a/packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/config_php72.yml b/packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/config_php72.yaml similarity index 100% rename from packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/config_php72.yml rename to packages/Php/tests/Rector/FunctionLike/ReturnTypeDeclarationRector/config_php72.yaml diff --git a/packages/Sensio/config/config.yml b/packages/Sensio/config/config.yaml similarity index 100% rename from packages/Sensio/config/config.yml rename to packages/Sensio/config/config.yaml diff --git a/packages/Symfony/config/config.yml b/packages/Symfony/config/config.yaml similarity index 100% rename from packages/Symfony/config/config.yml rename to packages/Symfony/config/config.yaml diff --git a/packages/Symfony/src/Bridge/SymfonyKernelParameterGuard.php b/packages/Symfony/src/Bridge/SymfonyKernelParameterGuard.php index 325f388173c..b583885e6b3 100644 --- a/packages/Symfony/src/Bridge/SymfonyKernelParameterGuard.php +++ b/packages/Symfony/src/Bridge/SymfonyKernelParameterGuard.php @@ -13,7 +13,7 @@ final class SymfonyKernelParameterGuard // ensure value is not null nor empty if ($kernelClass === null || $kernelClass === '') { throw new InvalidConfigurationException(sprintf( - 'Make sure "%s" parameters is set in rector.yml in "parameters:" section', + 'Make sure "%s" parameters is set in rector.yaml in "parameters:" section', Option::KERNEL_CLASS_PARAMETER )); } diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/ContainerGetToConstructorInjectionRectorTest.php b/packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/ContainerGetToConstructorInjectionRectorTest.php index 5a414396e35..219f6ef9a34 100644 --- a/packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/ContainerGetToConstructorInjectionRectorTest.php +++ b/packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/ContainerGetToConstructorInjectionRectorTest.php @@ -13,6 +13,6 @@ final class ContainerGetToConstructorInjectionRectorTest extends AbstractRectorT protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/config.yml b/packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/config.yaml similarity index 100% rename from packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/config.yml rename to packages/Symfony/tests/Rector/FrameworkBundle/ContainerGetToConstructorInjectionRector/config.yaml diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/GetToConstructorInjectionRectorTest.php b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/GetToConstructorInjectionRectorTest.php index fec1362e1df..3723c411585 100644 --- a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/GetToConstructorInjectionRectorTest.php +++ b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/GetToConstructorInjectionRectorTest.php @@ -18,6 +18,6 @@ final class GetToConstructorInjectionRectorTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/InvalidConfigurationConstructorInjectionRectorTest.php b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/InvalidConfigurationConstructorInjectionRectorTest.php index 0f6e485eae3..edc261cb1f2 100644 --- a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/InvalidConfigurationConstructorInjectionRectorTest.php +++ b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/InvalidConfigurationConstructorInjectionRectorTest.php @@ -13,7 +13,7 @@ final class InvalidConfigurationConstructorInjectionRectorTest extends AbstractR { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage( - 'Make sure "kernel_class" parameters is set in rector.yml in "parameters:" section' + 'Make sure "kernel_class" parameters is set in rector.yaml in "parameters:" section' ); $this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc']); diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/SecondInvalidConfigurationConstructorInjectionRectorTest.php b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/SecondInvalidConfigurationConstructorInjectionRectorTest.php index 4d98d36bf94..0b055a576a0 100644 --- a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/SecondInvalidConfigurationConstructorInjectionRectorTest.php +++ b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/SecondInvalidConfigurationConstructorInjectionRectorTest.php @@ -22,6 +22,6 @@ final class SecondInvalidConfigurationConstructorInjectionRectorTest extends Abs protected function provideConfig(): string { - return __DIR__ . '/invalid-config-2.yml'; + return __DIR__ . '/invalid-config-2.yaml'; } } diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/ThirdInvalidConfigurationConstructorInjectionRectorTest.php b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/ThirdInvalidConfigurationConstructorInjectionRectorTest.php index c3041f68e09..f0f3981406e 100644 --- a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/ThirdInvalidConfigurationConstructorInjectionRectorTest.php +++ b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/ThirdInvalidConfigurationConstructorInjectionRectorTest.php @@ -26,6 +26,6 @@ final class ThirdInvalidConfigurationConstructorInjectionRectorTest extends Abst protected function provideConfig(): string { - return __DIR__ . '/invalid-config-3.yml'; + return __DIR__ . '/invalid-config-3.yaml'; } } diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/config.yml b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/config.yaml similarity index 100% rename from packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/config.yml rename to packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/config.yaml diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-2.yml b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-2.yaml similarity index 100% rename from packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-2.yml rename to packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-2.yaml diff --git a/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-3.yml b/packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-3.yaml similarity index 100% rename from packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-3.yml rename to packages/Symfony/tests/Rector/FrameworkBundle/GetToConstructorInjectionRector/invalid-config-3.yaml diff --git a/src/CodingStyle/AfterRectorCodingStyle.php b/src/CodingStyle/AfterRectorCodingStyle.php index 5e80d22f2eb..164c672649e 100644 --- a/src/CodingStyle/AfterRectorCodingStyle.php +++ b/src/CodingStyle/AfterRectorCodingStyle.php @@ -16,7 +16,7 @@ final class AfterRectorCodingStyle /** * @var string */ - private const ECS_AFTER_RECTOR_CONFIG = __DIR__ . '/../../ecs-after-rector.yml'; + private const ECS_AFTER_RECTOR_CONFIG = __DIR__ . '/../../ecs-after-rector.yaml'; /** * @param string[] $source diff --git a/src/Console/Application.php b/src/Console/Application.php index b24fea3fd26..c9e2f5719eb 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -146,6 +146,6 @@ final class Application extends SymfonyApplication private function getDefaultConfigPath(): string { - return getcwd() . '/rector.yml'; + return getcwd() . '/rector.yaml'; } } diff --git a/src/DependencyInjection/RectorKernel.php b/src/DependencyInjection/RectorKernel.php index fd8633c26fc..09312b2385d 100644 --- a/src/DependencyInjection/RectorKernel.php +++ b/src/DependencyInjection/RectorKernel.php @@ -51,7 +51,7 @@ final class RectorKernel extends Kernel public function registerContainerConfiguration(LoaderInterface $loader): void { - $loader->load(__DIR__ . '/../../config/config.yml'); + $loader->load(__DIR__ . '/../../config/config.yaml'); foreach ($this->extraConfigFiles as $extraConfigFile) { $loader->load($extraConfigFile); diff --git a/src/Guard/RectorGuard.php b/src/Guard/RectorGuard.php index 2186372d376..a0bc3869daf 100644 --- a/src/Guard/RectorGuard.php +++ b/src/Guard/RectorGuard.php @@ -24,7 +24,7 @@ final class RectorGuard } throw new NoRectorsLoadedException(sprintf( - 'We need some rectors to run:%s* register them in rector.yml under "services:"%s* use "--level "%s* or "--config .yml"', + 'We need some rectors to run:%s* register them in rector.yaml under "services:"%s* use "--level "%s* or "--config .yaml"', PHP_EOL, PHP_EOL, PHP_EOL diff --git a/tests/FileSystem/FilesFinder/ExcludePaths/ExcludePathsTest.php b/tests/FileSystem/FilesFinder/ExcludePaths/ExcludePathsTest.php index 814d0851b84..a8644a64325 100644 --- a/tests/FileSystem/FilesFinder/ExcludePaths/ExcludePathsTest.php +++ b/tests/FileSystem/FilesFinder/ExcludePaths/ExcludePathsTest.php @@ -22,6 +22,6 @@ final class ExcludePathsTest extends AbstractConfigurableContainerAwareTestCase protected function provideConfig(): string { - return __DIR__ . '/config/config-with-excluded-paths.yml'; + return __DIR__ . '/config/config-with-excluded-paths.yaml'; } } diff --git a/tests/FileSystem/FilesFinder/ExcludePaths/config/config-with-excluded-paths.yml b/tests/FileSystem/FilesFinder/ExcludePaths/config/config-with-excluded-paths.yaml similarity index 100% rename from tests/FileSystem/FilesFinder/ExcludePaths/config/config-with-excluded-paths.yml rename to tests/FileSystem/FilesFinder/ExcludePaths/config/config-with-excluded-paths.yaml diff --git a/tests/Issues/Issue835/Issue835Test.php b/tests/Issues/Issue835/Issue835Test.php index 4a52394f60b..4c59e628237 100644 --- a/tests/Issues/Issue835/Issue835Test.php +++ b/tests/Issues/Issue835/Issue835Test.php @@ -13,6 +13,6 @@ final class Issue835Test extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config/config835.yml'; + return __DIR__ . '/config/config835.yaml'; } } diff --git a/tests/Issues/Issue835/config/config835.yaml b/tests/Issues/Issue835/config/config835.yaml new file mode 100644 index 00000000000..8479e584ff0 --- /dev/null +++ b/tests/Issues/Issue835/config/config835.yaml @@ -0,0 +1,3 @@ +imports: + # same as "--level cakephp34" + - { resource: "../../../../config/level/cakephp/cakephp34.yaml" } diff --git a/tests/Issues/Issue835/config/config835.yml b/tests/Issues/Issue835/config/config835.yml deleted file mode 100644 index 96040c0e2d0..00000000000 --- a/tests/Issues/Issue835/config/config835.yml +++ /dev/null @@ -1,3 +0,0 @@ -imports: - # same as "--level cakephp34" - - { resource: "../../../../config/level/cakephp/cakephp34.yml" } diff --git a/tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/ActionInjectionToConstructorInjectionRectorTest.php b/tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/ActionInjectionToConstructorInjectionRectorTest.php index 06c2fe7ed30..15a17931098 100644 --- a/tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/ActionInjectionToConstructorInjectionRectorTest.php +++ b/tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/ActionInjectionToConstructorInjectionRectorTest.php @@ -17,6 +17,6 @@ final class ActionInjectionToConstructorInjectionRectorTest extends AbstractRect protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/config.yml b/tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/config.yaml similarity index 100% rename from tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/config.yml rename to tests/Rector/Architecture/DependencyInjection/ActionInjectionToConstructorInjectionRector/config.yaml diff --git a/tests/Rector/Architecture/DoctrineRepositoryAsService/DoctrineRepositoryAsServiceTest.php b/tests/Rector/Architecture/DoctrineRepositoryAsService/DoctrineRepositoryAsServiceTest.php index 906e61b384b..eb8ea402130 100644 --- a/tests/Rector/Architecture/DoctrineRepositoryAsService/DoctrineRepositoryAsServiceTest.php +++ b/tests/Rector/Architecture/DoctrineRepositoryAsService/DoctrineRepositoryAsServiceTest.php @@ -18,6 +18,6 @@ final class DoctrineRepositoryAsServiceTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/tests/Rector/Architecture/DoctrineRepositoryAsService/config.yml b/tests/Rector/Architecture/DoctrineRepositoryAsService/config.yaml similarity index 90% rename from tests/Rector/Architecture/DoctrineRepositoryAsService/config.yml rename to tests/Rector/Architecture/DoctrineRepositoryAsService/config.yaml index a2e0d23de76..934bccb6b49 100644 --- a/tests/Rector/Architecture/DoctrineRepositoryAsService/config.yml +++ b/tests/Rector/Architecture/DoctrineRepositoryAsService/config.yaml @@ -3,4 +3,4 @@ parameters: entity_manager_class: 'Rector\Tests\Rector\Architecture\DoctrineRepositoryAsService\Source\EntityManagerClass' imports: - - { resource: '../../../../config/level/architecture/doctrine-repository-as-service.yml' } + - { resource: '../../../../config/level/architecture/doctrine-repository-as-service.yaml' } diff --git a/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/NewObjectToFactoryCreateRectorTest.php b/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/NewObjectToFactoryCreateRectorTest.php index bed7b0b575d..56c9f1664e7 100644 --- a/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/NewObjectToFactoryCreateRectorTest.php +++ b/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/NewObjectToFactoryCreateRectorTest.php @@ -13,6 +13,6 @@ final class NewObjectToFactoryCreateRectorTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/config.yml b/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/config.yaml similarity index 55% rename from tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/config.yml rename to tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/config.yaml index 8b73451753a..fde844d9a45 100644 --- a/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/config.yml +++ b/tests/Rector/Architecture/Factory/NewObjectToFactoryCreateRector/config.yaml @@ -1,5 +1,5 @@ services: Rector\Rector\Architecture\Factory\NewObjectToFactoryCreateRector: Rector\Tests\Rector\Architecture\Factory\NewObjectToFactoryCreateRector\Source\MyClass: - class: Rector\Tests\Rector\Architecture\Factory\NewObjectToFactoryCreateRector\Source\MyClassFactory - method: create + class: 'Rector\Tests\Rector\Architecture\Factory\NewObjectToFactoryCreateRector\Source\MyClassFactory' + method: 'create' diff --git a/tests/Rector/MethodBody/ReturnThisRemoveRector/ReturnThisRemoveRectorTest.php b/tests/Rector/MethodBody/ReturnThisRemoveRector/ReturnThisRemoveRectorTest.php index d2f43e0543e..94d9b0fa521 100644 --- a/tests/Rector/MethodBody/ReturnThisRemoveRector/ReturnThisRemoveRectorTest.php +++ b/tests/Rector/MethodBody/ReturnThisRemoveRector/ReturnThisRemoveRectorTest.php @@ -17,6 +17,6 @@ final class ReturnThisRemoveRectorTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/tests/Rector/MethodBody/ReturnThisRemoveRector/config.yml b/tests/Rector/MethodBody/ReturnThisRemoveRector/config.yaml similarity index 100% rename from tests/Rector/MethodBody/ReturnThisRemoveRector/config.yml rename to tests/Rector/MethodBody/ReturnThisRemoveRector/config.yaml diff --git a/tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/MultipleClassFileToPsr4ClassesRectorTest.php b/tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/MultipleClassFileToPsr4ClassesRectorTest.php index 97bf7ca30eb..01058bc2fe1 100644 --- a/tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/MultipleClassFileToPsr4ClassesRectorTest.php +++ b/tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/MultipleClassFileToPsr4ClassesRectorTest.php @@ -74,6 +74,6 @@ final class MultipleClassFileToPsr4ClassesRectorTest extends AbstractFileSystemR protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/config.yml b/tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/config.yaml similarity index 100% rename from tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/config.yml rename to tests/Rector/Psr4/MultipleClassFileToPsr4ClassesRector/config.yaml diff --git a/tests/Rector/RectorOrder/RectorOrderTest.php b/tests/Rector/RectorOrder/RectorOrderTest.php index 3df810a0760..6fbece091a9 100644 --- a/tests/Rector/RectorOrder/RectorOrderTest.php +++ b/tests/Rector/RectorOrder/RectorOrderTest.php @@ -16,6 +16,6 @@ final class RectorOrderTest extends AbstractRectorTestCase protected function provideConfig(): string { - return __DIR__ . '/config.yml'; + return __DIR__ . '/config.yaml'; } } diff --git a/tests/Rector/RectorOrder/config.yml b/tests/Rector/RectorOrder/config.yaml similarity index 100% rename from tests/Rector/RectorOrder/config.yml rename to tests/Rector/RectorOrder/config.yaml