Skip to content

Commit

Permalink
Updated Rector to commit 9cd69c2
Browse files Browse the repository at this point in the history
rectorphp/rector-src@9cd69c2 [automated] Re-Generate Nodes/Rectors Documentation (#2385)
  • Loading branch information
TomasVotruba committed May 29, 2022
1 parent b5e7b13 commit 9a9e896
Show file tree
Hide file tree
Showing 1,965 changed files with 13,090 additions and 13,071 deletions.
2 changes: 1 addition & 1 deletion bin/rector
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env php
<?php
namespace RectorPrefix20220528;
namespace RectorPrefix20220529;

require_once __DIR__ . '/rector.php';
22 changes: 11 additions & 11 deletions bin/rector.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php

declare (strict_types=1);
namespace RectorPrefix20220528;
namespace RectorPrefix20220529;

use RectorPrefix20220528\Nette\Utils\Json;
use RectorPrefix20220529\Nette\Utils\Json;
use Rector\ChangesReporting\Output\JsonOutputFormatter;
use Rector\Core\Bootstrap\RectorConfigsResolver;
use Rector\Core\Configuration\Option;
use Rector\Core\Console\ConsoleApplication;
use Rector\Core\Console\Style\RectorConsoleOutputStyleFactory;
use Rector\Core\DependencyInjection\RectorContainerFactory;
use Rector\Core\Kernel\RectorKernel;
use RectorPrefix20220528\Symfony\Component\Console\Command\Command;
use RectorPrefix20220528\Symfony\Component\Console\Input\ArgvInput;
use RectorPrefix20220528\Symplify\PackageBuilder\Reflection\PrivatesCaller;
use RectorPrefix20220529\Symfony\Component\Console\Command\Command;
use RectorPrefix20220529\Symfony\Component\Console\Input\ArgvInput;
use RectorPrefix20220529\Symplify\PackageBuilder\Reflection\PrivatesCaller;
// @ intentionally: continue anyway
@\ini_set('memory_limit', '-1');
// Performance boost
Expand All @@ -22,7 +22,7 @@
\gc_disable();
\define('__RECTOR_RUNNING__', \true);
// Require Composer autoload.php
$autoloadIncluder = new \RectorPrefix20220528\AutoloadIncluder();
$autoloadIncluder = new \RectorPrefix20220529\AutoloadIncluder();
$autoloadIncluder->includeDependencyOrRepositoryVendorAutoloadIfExists();
final class AutoloadIncluder
{
Expand Down Expand Up @@ -95,7 +95,7 @@ public function loadIfExistsAndNotLoadedYet(string $filePath) : void
require_once $filePath;
}
}
\class_alias('RectorPrefix20220528\\AutoloadIncluder', 'AutoloadIncluder', \false);
\class_alias('RectorPrefix20220529\\AutoloadIncluder', 'AutoloadIncluder', \false);
if (\file_exists(__DIR__ . '/../preload.php') && \is_dir(__DIR__ . '/../vendor')) {
require_once __DIR__ . '/../preload.php';
}
Expand All @@ -111,18 +111,18 @@ public function loadIfExistsAndNotLoadedYet(string $filePath) : void
$container = $rectorContainerFactory->createFromBootstrapConfigs($bootstrapConfigs);
} catch (\Throwable $throwable) {
// for json output
$argvInput = new \RectorPrefix20220528\Symfony\Component\Console\Input\ArgvInput();
$argvInput = new \RectorPrefix20220529\Symfony\Component\Console\Input\ArgvInput();
$outputFormat = $argvInput->getParameterOption('--' . \Rector\Core\Configuration\Option::OUTPUT_FORMAT);
// report fatal error in json format
if ($outputFormat === \Rector\ChangesReporting\Output\JsonOutputFormatter::NAME) {
echo \RectorPrefix20220528\Nette\Utils\Json::encode(['fatal_errors' => [$throwable->getMessage()]]);
echo \RectorPrefix20220529\Nette\Utils\Json::encode(['fatal_errors' => [$throwable->getMessage()]]);
} else {
// report fatal errors in console format
$rectorConsoleOutputStyleFactory = new \Rector\Core\Console\Style\RectorConsoleOutputStyleFactory(new \RectorPrefix20220528\Symplify\PackageBuilder\Reflection\PrivatesCaller());
$rectorConsoleOutputStyleFactory = new \Rector\Core\Console\Style\RectorConsoleOutputStyleFactory(new \RectorPrefix20220529\Symplify\PackageBuilder\Reflection\PrivatesCaller());
$rectorConsoleOutputStyle = $rectorConsoleOutputStyleFactory->create();
$rectorConsoleOutputStyle->error($throwable->getMessage());
}
exit(\RectorPrefix20220528\Symfony\Component\Console\Command\Command::FAILURE);
exit(\RectorPrefix20220529\Symfony\Component\Console\Command\Command::FAILURE);
}
/** @var ConsoleApplication $application */
$application = $container->get(\Rector\Core\Console\ConsoleApplication::class);
Expand Down
96 changes: 48 additions & 48 deletions config/config.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

declare (strict_types=1);
namespace RectorPrefix20220528;
namespace RectorPrefix20220529;

use RectorPrefix20220528\Composer\Semver\VersionParser;
use RectorPrefix20220528\Doctrine\Inflector\Inflector;
use RectorPrefix20220528\Doctrine\Inflector\Rules\English\InflectorFactory;
use RectorPrefix20220528\OndraM\CiDetector\CiDetector;
use RectorPrefix20220529\Composer\Semver\VersionParser;
use RectorPrefix20220529\Doctrine\Inflector\Inflector;
use RectorPrefix20220529\Doctrine\Inflector\Rules\English\InflectorFactory;
use RectorPrefix20220529\OndraM\CiDetector\CiDetector;
use PhpParser\BuilderFactory;
use PhpParser\Lexer;
use PhpParser\NodeFinder;
Expand Down Expand Up @@ -37,23 +37,23 @@
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider;
use Rector\PSR4\Composer\PSR4NamespaceMatcher;
use Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface;
use RectorPrefix20220528\Symfony\Component\Console\Application;
use function RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service;
use RectorPrefix20220528\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
use RectorPrefix20220528\Symplify\EasyParallel\ValueObject\EasyParallelConfig;
use RectorPrefix20220528\Symplify\PackageBuilder\Parameter\ParameterProvider;
use RectorPrefix20220528\Symplify\PackageBuilder\Php\TypeChecker;
use RectorPrefix20220528\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
use RectorPrefix20220528\Symplify\PackageBuilder\Reflection\PrivatesCaller;
use RectorPrefix20220528\Symplify\PackageBuilder\Yaml\ParametersMerger;
use RectorPrefix20220528\Symplify\SmartFileSystem\FileSystemFilter;
use RectorPrefix20220528\Symplify\SmartFileSystem\FileSystemGuard;
use RectorPrefix20220528\Symplify\SmartFileSystem\Finder\FinderSanitizer;
use RectorPrefix20220528\Symplify\SmartFileSystem\Json\JsonFileSystem;
use RectorPrefix20220528\Symplify\SmartFileSystem\SmartFileSystem;
use RectorPrefix20220529\Symfony\Component\Console\Application;
use function RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service;
use RectorPrefix20220529\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
use RectorPrefix20220529\Symplify\EasyParallel\ValueObject\EasyParallelConfig;
use RectorPrefix20220529\Symplify\PackageBuilder\Parameter\ParameterProvider;
use RectorPrefix20220529\Symplify\PackageBuilder\Php\TypeChecker;
use RectorPrefix20220529\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
use RectorPrefix20220529\Symplify\PackageBuilder\Reflection\PrivatesCaller;
use RectorPrefix20220529\Symplify\PackageBuilder\Yaml\ParametersMerger;
use RectorPrefix20220529\Symplify\SmartFileSystem\FileSystemFilter;
use RectorPrefix20220529\Symplify\SmartFileSystem\FileSystemGuard;
use RectorPrefix20220529\Symplify\SmartFileSystem\Finder\FinderSanitizer;
use RectorPrefix20220529\Symplify\SmartFileSystem\Json\JsonFileSystem;
use RectorPrefix20220529\Symplify\SmartFileSystem\SmartFileSystem;
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
// make use of https://github.com/symplify/easy-parallel
$rectorConfig->import(\RectorPrefix20220528\Symplify\EasyParallel\ValueObject\EasyParallelConfig::FILE_PATH);
$rectorConfig->import(\RectorPrefix20220529\Symplify\EasyParallel\ValueObject\EasyParallelConfig::FILE_PATH);
$rectorConfig->paths([]);
$rectorConfig->skip([]);
$rectorConfig->autoloadPaths([]);
Expand Down Expand Up @@ -82,10 +82,10 @@
$services->alias(\Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface::class, \Rector\PSR4\Composer\PSR4NamespaceMatcher::class);
$services->load('Rector\\', __DIR__ . '/../rules')->exclude([__DIR__ . '/../rules/*/ValueObject/*', __DIR__ . '/../rules/*/Rector/*', __DIR__ . '/../rules/*/Contract/*', __DIR__ . '/../rules/*/Exception/*', __DIR__ . '/../rules/*/Enum/*', __DIR__ . '/../rules/DowngradePhp80/Reflection/SimplePhpParameterReflection.php']);
// parallel
$services->set(\RectorPrefix20220528\Symplify\PackageBuilder\Yaml\ParametersMerger::class);
$services->set(\RectorPrefix20220529\Symplify\PackageBuilder\Yaml\ParametersMerger::class);
// use faster in-memory cache in CI.
// CI always starts from scratch, therefore IO intensive caching is not worth it
$ciDetector = new \RectorPrefix20220528\OndraM\CiDetector\CiDetector();
$ciDetector = new \RectorPrefix20220529\OndraM\CiDetector\CiDetector();
if ($ciDetector->isCiDetected()) {
$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\MemoryCacheStorage::class);
}
Expand All @@ -97,43 +97,43 @@
// require only in dev
$rectorConfig->import(__DIR__ . '/../utils/compiler/config/config.php', null, 'not_found');
$services->load('Rector\\Core\\', __DIR__ . '/../src')->exclude([__DIR__ . '/../src/Rector', __DIR__ . '/../src/Console/Style/RectorConsoleOutputStyle.php', __DIR__ . '/../src/Exception', __DIR__ . '/../src/DependencyInjection/CompilerPass', __DIR__ . '/../src/DependencyInjection/Loader', __DIR__ . '/../src/Kernel', __DIR__ . '/../src/ValueObject', __DIR__ . '/../src/Bootstrap', __DIR__ . '/../src/Enum', __DIR__ . '/../src/PhpParser/Node/CustomNode', __DIR__ . '/../src/PhpParser/ValueObject', __DIR__ . '/../src/functions', __DIR__ . '/../src/constants.php']);
$services->alias(\RectorPrefix20220528\Symfony\Component\Console\Application::class, \Rector\Core\Console\ConsoleApplication::class);
$services->set(\Rector\Core\Validation\Collector\EmptyConfigurableRectorCollector::class)->arg('$containerBuilder', \RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
$services->set(\RectorPrefix20220528\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser::class);
$services->alias(\RectorPrefix20220529\Symfony\Component\Console\Application::class, \Rector\Core\Console\ConsoleApplication::class);
$services->set(\Rector\Core\Validation\Collector\EmptyConfigurableRectorCollector::class)->arg('$containerBuilder', \RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
$services->set(\RectorPrefix20220529\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser::class);
$services->set(\PhpParser\BuilderFactory::class);
$services->set(\PhpParser\NodeVisitor\CloningVisitor::class);
$services->set(\PhpParser\NodeVisitor\NodeConnectingVisitor::class);
$services->set(\PhpParser\NodeFinder::class);
$services->set(\Rector\Core\Console\Style\RectorConsoleOutputStyle::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\Console\Style\RectorConsoleOutputStyleFactory::class), 'create']);
$services->set(\PHPStan\Parser\Parser::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createPHPStanParser']);
$services->set(\PhpParser\Lexer::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createEmulativeLexer']);
$services->set(\Rector\Core\Console\Style\RectorConsoleOutputStyle::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\Console\Style\RectorConsoleOutputStyleFactory::class), 'create']);
$services->set(\PHPStan\Parser\Parser::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createPHPStanParser']);
$services->set(\PhpParser\Lexer::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createEmulativeLexer']);
// symplify/package-builder
$services->set(\RectorPrefix20220528\Symplify\SmartFileSystem\FileSystemGuard::class);
$services->set(\RectorPrefix20220528\Symplify\PackageBuilder\Reflection\PrivatesAccessor::class);
$services->set(\RectorPrefix20220528\Symplify\PackageBuilder\Reflection\PrivatesCaller::class);
$services->set(\RectorPrefix20220528\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
$services->set(\RectorPrefix20220528\Symplify\SmartFileSystem\FileSystemFilter::class);
$services->set(\RectorPrefix20220528\Symplify\PackageBuilder\Parameter\ParameterProvider::class)->arg('$container', \RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
$services->set(\RectorPrefix20220528\Symplify\SmartFileSystem\SmartFileSystem::class);
$services->set(\RectorPrefix20220528\Symplify\SmartFileSystem\Json\JsonFileSystem::class);
$services->set(\RectorPrefix20220528\Doctrine\Inflector\Rules\English\InflectorFactory::class);
$services->set(\RectorPrefix20220528\Doctrine\Inflector\Inflector::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20220528\Doctrine\Inflector\Rules\English\InflectorFactory::class), 'build']);
$services->set(\RectorPrefix20220528\Composer\Semver\VersionParser::class);
$services->set(\RectorPrefix20220528\Symplify\PackageBuilder\Php\TypeChecker::class);
$services->set(\RectorPrefix20220529\Symplify\SmartFileSystem\FileSystemGuard::class);
$services->set(\RectorPrefix20220529\Symplify\PackageBuilder\Reflection\PrivatesAccessor::class);
$services->set(\RectorPrefix20220529\Symplify\PackageBuilder\Reflection\PrivatesCaller::class);
$services->set(\RectorPrefix20220529\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
$services->set(\RectorPrefix20220529\Symplify\SmartFileSystem\FileSystemFilter::class);
$services->set(\RectorPrefix20220529\Symplify\PackageBuilder\Parameter\ParameterProvider::class)->arg('$container', \RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
$services->set(\RectorPrefix20220529\Symplify\SmartFileSystem\SmartFileSystem::class);
$services->set(\RectorPrefix20220529\Symplify\SmartFileSystem\Json\JsonFileSystem::class);
$services->set(\RectorPrefix20220529\Doctrine\Inflector\Rules\English\InflectorFactory::class);
$services->set(\RectorPrefix20220529\Doctrine\Inflector\Inflector::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20220529\Doctrine\Inflector\Rules\English\InflectorFactory::class), 'build']);
$services->set(\RectorPrefix20220529\Composer\Semver\VersionParser::class);
$services->set(\RectorPrefix20220529\Symplify\PackageBuilder\Php\TypeChecker::class);
// phpdoc parser
$services->set(\PHPStan\PhpDocParser\Lexer\Lexer::class);
$services->alias(\PHPStan\PhpDocParser\Parser\PhpDocParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterPhpDocParser::class);
// cache
$services->set(\PHPStan\Dependency\DependencyResolver::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDependencyResolver']);
$services->set(\PHPStan\File\FileHelper::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createFileHelper']);
$services->set(\Rector\Caching\Cache::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Caching\CacheFactory::class), 'create']);
$services->set(\PHPStan\Dependency\DependencyResolver::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDependencyResolver']);
$services->set(\PHPStan\File\FileHelper::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createFileHelper']);
$services->set(\Rector\Caching\Cache::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Caching\CacheFactory::class), 'create']);
// type resolving
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator::class);
$services->alias(\PHPStan\PhpDocParser\Parser\TypeParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterTypeParser::class);
// PHPStan services
$services->set(\PHPStan\Reflection\ReflectionProvider::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createReflectionProvider']);
$services->set(\PHPStan\Analyser\NodeScopeResolver::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createNodeScopeResolver']);
$services->set(\PHPStan\Analyser\ScopeFactory::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createScopeFactory']);
$services->set(\PHPStan\PhpDoc\TypeNodeResolver::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createTypeNodeResolver']);
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider::class)->factory([\RectorPrefix20220528\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDynamicSourceLocatorProvider']);
$services->set(\PHPStan\Reflection\ReflectionProvider::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createReflectionProvider']);
$services->set(\PHPStan\Analyser\NodeScopeResolver::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createNodeScopeResolver']);
$services->set(\PHPStan\Analyser\ScopeFactory::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createScopeFactory']);
$services->set(\PHPStan\PhpDoc\TypeNodeResolver::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createTypeNodeResolver']);
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider::class)->factory([\RectorPrefix20220529\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDynamicSourceLocatorProvider']);
};
2 changes: 1 addition & 1 deletion config/set/action-injection-to-constructor-injection.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace RectorPrefix20220528;
namespace RectorPrefix20220529;

use Rector\Config\RectorConfig;
use Rector\DependencyInjection\Rector\Class_\ActionInjectionToConstructorInjectionRector;
Expand Down
2 changes: 1 addition & 1 deletion config/set/code-quality.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace RectorPrefix20220528;
namespace RectorPrefix20220529;

use Rector\CodeQuality\Rector\Array_\ArrayThisCallToThisMethodCallRector;
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
Expand Down
2 changes: 1 addition & 1 deletion config/set/coding-style.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

declare (strict_types=1);
namespace RectorPrefix20220528;
namespace RectorPrefix20220529;

use Rector\CodingStyle\Rector\Assign\PHPStormVarAnnotationRector;
use Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector;
Expand Down
Loading

0 comments on commit 9a9e896

Please sign in to comment.