Updated Rector to commit a09d515233

a09d515233 [TASK] Move RemovedAndAddedFilesCollector (#9)
This commit is contained in:
Tomas Votruba 2021-05-11 10:44:08 +00:00
parent 436fcb7505
commit 1d2f9989ce
6 changed files with 26 additions and 27 deletions

View File

@ -4,6 +4,7 @@ declare (strict_types=1);
namespace Rector\Core\Application;
use Rector\Core\Application\FileDecorator\FileDiffFileDecorator;
use Rector\Core\Application\FileSystem\RemovedAndAddedFilesProcessor;
use Rector\Core\Configuration\Configuration;
use Rector\Core\Contract\Processor\FileProcessorInterface;
use Rector\Core\ValueObject\Application\File;
@ -27,6 +28,10 @@ final class ApplicationFileProcessor
* @var \Rector\FileFormatter\FileFormatter
*/
private $fileFormatter;
/**
* @var \Rector\Core\Application\FileSystem\RemovedAndAddedFilesProcessor
*/
private $removedAndAddedFilesProcessor;
/**
* @var mixed[]
*/
@ -34,12 +39,13 @@ final class ApplicationFileProcessor
/**
* @param FileProcessorInterface[] $fileProcessors
*/
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \RectorPrefix20210511\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem, \Rector\Core\Application\FileDecorator\FileDiffFileDecorator $fileDiffFileDecorator, \Rector\FileFormatter\FileFormatter $fileFormatter, array $fileProcessors = [])
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \RectorPrefix20210511\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem, \Rector\Core\Application\FileDecorator\FileDiffFileDecorator $fileDiffFileDecorator, \Rector\FileFormatter\FileFormatter $fileFormatter, \Rector\Core\Application\FileSystem\RemovedAndAddedFilesProcessor $removedAndAddedFilesProcessor, array $fileProcessors = [])
{
$this->configuration = $configuration;
$this->smartFileSystem = $smartFileSystem;
$this->fileDiffFileDecorator = $fileDiffFileDecorator;
$this->fileFormatter = $fileFormatter;
$this->removedAndAddedFilesProcessor = $removedAndAddedFilesProcessor;
$this->fileProcessors = $fileProcessors;
}
/**
@ -63,6 +69,7 @@ final class ApplicationFileProcessor
});
$fileProcessor->process($supportedFiles);
}
$this->removedAndAddedFilesProcessor->run();
}
/**
* @param File[] $files

View File

@ -55,10 +55,6 @@ final class PhpFileProcessor implements \Rector\Core\Contract\Processor\FileProc
* @var \Rector\Core\Application\FileSystem\RemovedAndAddedFilesCollector
*/
private $removedAndAddedFilesCollector;
/**
* @var \Rector\Core\Application\FileSystem\RemovedAndAddedFilesProcessor
*/
private $removedAndAddedFilesProcessor;
/**
* @var \Symfony\Component\Console\Style\SymfonyStyle
*/
@ -83,20 +79,18 @@ final class PhpFileProcessor implements \Rector\Core\Contract\Processor\FileProc
* @var \Rector\ChangesReporting\ValueObjectFactory\ErrorFactory
*/
private $errorFactory;
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \Rector\Core\PhpParser\Printer\FormatPerservingPrinter $formatPerservingPrinter, \Rector\Core\Application\FileProcessor $fileProcessor, \Rector\Core\Application\FileSystem\RemovedAndAddedFilesCollector $removedAndAddedFilesCollector, \Rector\Core\Application\FileSystem\RemovedAndAddedFilesProcessor $removedAndAddedFilesProcessor, \RectorPrefix20210511\Symfony\Component\Console\Style\SymfonyStyle $symfonyStyle, \RectorPrefix20210511\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor, \Rector\Core\Application\FileDecorator\FileDiffFileDecorator $fileDiffFileDecorator, \Rector\Core\Provider\CurrentFileProvider $currentFileProvider, \Rector\PostRector\Application\PostFileProcessor $postFileProcessor, \Rector\ChangesReporting\ValueObjectFactory\ErrorFactory $errorFactory)
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \Rector\Core\PhpParser\Printer\FormatPerservingPrinter $formatPerservingPrinter, \Rector\Core\Application\FileProcessor $fileProcessor, \Rector\Core\Application\FileSystem\RemovedAndAddedFilesCollector $removedAndAddedFilesCollector, \RectorPrefix20210511\Symfony\Component\Console\Style\SymfonyStyle $symfonyStyle, \RectorPrefix20210511\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor, \Rector\Core\Application\FileDecorator\FileDiffFileDecorator $fileDiffFileDecorator, \Rector\Core\Provider\CurrentFileProvider $currentFileProvider, \Rector\PostRector\Application\PostFileProcessor $postFileProcessor, \Rector\ChangesReporting\ValueObjectFactory\ErrorFactory $errorFactory)
{
$this->configuration = $configuration;
$this->formatPerservingPrinter = $formatPerservingPrinter;
$this->fileProcessor = $fileProcessor;
$this->removedAndAddedFilesCollector = $removedAndAddedFilesCollector;
$this->removedAndAddedFilesProcessor = $removedAndAddedFilesProcessor;
$this->symfonyStyle = $symfonyStyle;
$this->privatesAccessor = $privatesAccessor;
$this->fileDiffFileDecorator = $fileDiffFileDecorator;
$this->currentFileProvider = $currentFileProvider;
$this->postFileProcessor = $postFileProcessor;
$this->errorFactory = $errorFactory;
$this->configuration = $configuration;
}
/**
* @param File[] $files
@ -139,8 +133,6 @@ final class PhpFileProcessor implements \Rector\Core\Contract\Processor\FileProc
if ($this->configuration->shouldShowProgressBar()) {
$this->symfonyStyle->newLine(2);
}
// 4. remove and add files
$this->removedAndAddedFilesProcessor->run();
}
public function supports(\Rector\Core\ValueObject\Application\File $file) : bool
{

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995::getLoader();
return ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995
class ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitbc134df4997d4547e532086b43d1a995::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit5b2d5c5c89deb04600b7773799212ab9::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitbc134df4997d4547e532086b43d1a995::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit5b2d5c5c89deb04600b7773799212ab9::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirebc134df4997d4547e532086b43d1a995($fileIdentifier, $file);
composerRequire5b2d5c5c89deb04600b7773799212ab9($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequirebc134df4997d4547e532086b43d1a995($fileIdentifier, $file)
function composerRequire5b2d5c5c89deb04600b7773799212ab9($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitbc134df4997d4547e532086b43d1a995
class ComposerStaticInit5b2d5c5c89deb04600b7773799212ab9
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3465,9 +3465,9 @@ class ComposerStaticInitbc134df4997d4547e532086b43d1a995
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitbc134df4997d4547e532086b43d1a995::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbc134df4997d4547e532086b43d1a995::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbc134df4997d4547e532086b43d1a995::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit5b2d5c5c89deb04600b7773799212ab9::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5b2d5c5c89deb04600b7773799212ab9::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit5b2d5c5c89deb04600b7773799212ab9::$classMap;
}, null, ClassLoader::class);
}

View File

@ -21,8 +21,8 @@ if (!class_exists('SomeTestCase', false) && !interface_exists('SomeTestCase', fa
if (!class_exists('CheckoutEntityFactory', false) && !interface_exists('CheckoutEntityFactory', false) && !trait_exists('CheckoutEntityFactory', false)) {
spl_autoload_call('RectorPrefix20210511\CheckoutEntityFactory');
}
if (!class_exists('ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995', false) && !interface_exists('ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995', false) && !trait_exists('ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995', false)) {
spl_autoload_call('RectorPrefix20210511\ComposerAutoloaderInitbc134df4997d4547e532086b43d1a995');
if (!class_exists('ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9', false) && !interface_exists('ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9', false) && !trait_exists('ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9', false)) {
spl_autoload_call('RectorPrefix20210511\ComposerAutoloaderInit5b2d5c5c89deb04600b7773799212ab9');
}
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
spl_autoload_call('RectorPrefix20210511\Doctrine\Inflector\Inflector');
@ -92,9 +92,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20210511\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirebc134df4997d4547e532086b43d1a995')) {
function composerRequirebc134df4997d4547e532086b43d1a995() {
return \RectorPrefix20210511\composerRequirebc134df4997d4547e532086b43d1a995(...func_get_args());
if (!function_exists('composerRequire5b2d5c5c89deb04600b7773799212ab9')) {
function composerRequire5b2d5c5c89deb04600b7773799212ab9() {
return \RectorPrefix20210511\composerRequire5b2d5c5c89deb04600b7773799212ab9(...func_get_args());
}
}
if (!function_exists('parseArgs')) {