Updated Rector to commit e33afe6434

0eeaea9f4a [Configuration] Remove null bootstrap configs e33afe6434 Merge pull request #1647 from rectorphp/tv-configuration-null-config-cleanup
This commit is contained in:
Tomas Votruba 2022-01-07 15:47:35 +00:00
parent ff1735e468
commit a92c1d7023
15 changed files with 51 additions and 80 deletions

View File

@ -30,7 +30,7 @@ final class JsonOutputFormatter implements \Rector\ChangesReporting\Contract\Out
}
public function report(\Rector\Core\ValueObject\ProcessResult $processResult, \Rector\Core\ValueObject\Configuration $configuration) : void
{
$errorsJson = ['meta' => ['config' => $configuration->getMainConfigFilePath()], 'totals' => ['changed_files' => \count($processResult->getFileDiffs()), 'removed_and_added_files_count' => $processResult->getRemovedAndAddedFilesCount(), 'removed_node_count' => $processResult->getRemovedNodeCount()]];
$errorsJson = ['totals' => ['changed_files' => \count($processResult->getFileDiffs()), 'removed_and_added_files_count' => $processResult->getRemovedAndAddedFilesCount(), 'removed_node_count' => $processResult->getRemovedNodeCount()]];
$fileDiffs = $processResult->getFileDiffs();
\ksort($fileDiffs);
foreach ($fileDiffs as $fileDiff) {

View File

@ -61,7 +61,7 @@ final class ParallelFileProcessor
* @param Closure(int): void|null $postFileCallback Used for progress bar jump
* @return mixed[]
*/
public function process(\RectorPrefix20220107\Symplify\EasyParallel\ValueObject\Schedule $schedule, string $mainScript, \Closure $postFileCallback, ?string $projectConfigFile, \RectorPrefix20220107\Symfony\Component\Console\Input\InputInterface $input) : array
public function process(\RectorPrefix20220107\Symplify\EasyParallel\ValueObject\Schedule $schedule, string $mainScript, \Closure $postFileCallback, \RectorPrefix20220107\Symfony\Component\Console\Input\InputInterface $input) : array
{
$jobs = \array_reverse($schedule->getJobs());
$streamSelectLoop = new \RectorPrefix20220107\React\EventLoop\StreamSelectLoop();
@ -110,7 +110,7 @@ final class ParallelFileProcessor
break;
}
$processIdentifier = \RectorPrefix20220107\Nette\Utils\Random::generate();
$workerCommandLine = $this->workerCommandLineFactory->create($mainScript, \Rector\Core\Console\Command\ProcessCommand::class, \RectorPrefix20220107\Symplify\PackageBuilder\Console\Command\CommandNaming::classToName(\Rector\Core\Console\Command\WorkerCommand::class), $projectConfigFile, $input, $processIdentifier, $serverPort);
$workerCommandLine = $this->workerCommandLineFactory->create($mainScript, \Rector\Core\Console\Command\ProcessCommand::class, \RectorPrefix20220107\Symplify\PackageBuilder\Console\Command\CommandNaming::classToName(\Rector\Core\Console\Command\WorkerCommand::class), $input, $processIdentifier, $serverPort);
$parallelProcess = new \RectorPrefix20220107\Symplify\EasyParallel\ValueObject\ParallelProcess($workerCommandLine, $streamSelectLoop, self::TIMEOUT_IN_SECONDS);
$parallelProcess->start(
// 1. callable on data

View File

@ -31,7 +31,7 @@ final class WorkerCommandLineFactory
/**
* @param class-string<Command> $mainCommandClass
*/
public function create(string $mainScript, string $mainCommandClass, string $workerCommandName, ?string $projectConfigFile, \RectorPrefix20220107\Symfony\Component\Console\Input\InputInterface $input, string $identifier, int $port) : string
public function create(string $mainScript, string $mainCommandClass, string $workerCommandName, \RectorPrefix20220107\Symfony\Component\Console\Input\InputInterface $input, string $identifier, int $port) : string
{
$commandArguments = \array_slice($_SERVER['argv'], 1);
$args = \array_merge([\PHP_BINARY, $mainScript], $commandArguments);
@ -51,10 +51,6 @@ final class WorkerCommandLineFactory
$workerCommandArray[] = \escapeshellarg($arg);
}
$workerCommandArray[] = $workerCommandName;
if ($projectConfigFile !== null) {
$workerCommandArray[] = self::OPTION_DASHES . \Rector\Core\Configuration\Option::CONFIG;
$workerCommandArray[] = \escapeshellarg($projectConfigFile);
}
$mainCommandOptionNames = $this->getCommandOptionNames($mainCommand);
$workerCommandOptions = $this->mirrorCommandOptions($input, $mainCommandOptionNames);
$workerCommandArray = \array_merge($workerCommandArray, $workerCommandOptions);
@ -74,6 +70,10 @@ final class WorkerCommandLineFactory
// disable colors, breaks json_decode() otherwise
// @see https://github.com/symfony/symfony/issues/1238
$workerCommandArray[] = '--no-ansi';
if ($input->hasOption(\Rector\Core\Configuration\Option::CONFIG)) {
$workerCommandArray[] = '--config';
$workerCommandArray[] = $input->getOption(\Rector\Core\Configuration\Option::CONFIG);
}
return \implode(' ', $workerCommandArray);
}
private function shouldSkipOption(\RectorPrefix20220107\Symfony\Component\Console\Input\InputInterface $input, string $optionName) : bool

View File

@ -255,7 +255,7 @@ final class ApplicationFileProcessor
throw new \RectorPrefix20220107\Symplify\EasyParallel\Exception\ParallelShouldNotHappenException('[parallel] Main script was not found');
}
// mimics see https://github.com/phpstan/phpstan-src/commit/9124c66dcc55a222e21b1717ba5f60771f7dda92#diff-387b8f04e0db7a06678eb52ce0c0d0aff73e0d7d8fc5df834d0a5fbec198e5daR139
return $this->parallelFileProcessor->process($schedule, $mainScript, $postFileCallback, $configuration->getConfig(), $input);
return $this->parallelFileProcessor->process($schedule, $mainScript, $postFileCallback, $input);
}
/**
* Path to called "ecs" binary file, e.g. "vendor/bin/ecs" returns "vendor/bin/ecs" This is needed to re-call the

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '111bf5d78adbd38f740505bd5a98292834407897';
public const PACKAGE_VERSION = 'e33afe6434a9707374815bb977cff09b6e57c199';
/**
* @var string
*/
public const RELEASE_DATE = '2022-01-07 13:35:52';
public const RELEASE_DATE = '2022-01-07 16:38:10';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220107\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -4,7 +4,6 @@ declare (strict_types=1);
namespace Rector\Core\Configuration;
use Rector\ChangesReporting\Output\ConsoleOutputFormatter;
use Rector\Core\Bootstrap\RectorConfigsResolver;
use Rector\Core\ValueObject\Configuration;
use RectorPrefix20220107\Symfony\Component\Console\Input\InputInterface;
use RectorPrefix20220107\Symfony\Component\Console\Style\SymfonyStyle;
@ -49,8 +48,7 @@ final class ConfigurationFactory
$isParallel = $this->parameterProvider->provideBoolParameter(\Rector\Core\Configuration\Option::PARALLEL);
$parallelPort = (string) $input->getOption(\Rector\Core\Configuration\Option::PARALLEL_PORT);
$parallelIdentifier = (string) $input->getOption(\Rector\Core\Configuration\Option::PARALLEL_IDENTIFIER);
$rectorConfigsResolver = new \Rector\Core\Bootstrap\RectorConfigsResolver();
return new \Rector\Core\ValueObject\Configuration($isDryRun, $showProgressBar, $shouldClearCache, $outputFormat, $fileExtensions, $paths, $showDiffs, $rectorConfigsResolver->provide(), $parallelPort, $parallelIdentifier, $isParallel);
return new \Rector\Core\ValueObject\Configuration($isDryRun, $showProgressBar, $shouldClearCache, $outputFormat, $fileExtensions, $paths, $showDiffs, $parallelPort, $parallelIdentifier, $isParallel);
}
private function shouldShowProgressBar(\RectorPrefix20220107\Symfony\Component\Console\Input\InputInterface $input, string $outputFormat) : bool
{

View File

@ -5,8 +5,6 @@ namespace Rector\Core\ValueObject;
use RectorPrefix20220107\JetBrains\PhpStorm\Immutable;
use Rector\ChangesReporting\Output\ConsoleOutputFormatter;
use Rector\Core\ValueObject\Bootstrap\BootstrapConfigs;
use Symplify\SmartFileSystem\SmartFileInfo;
#[Immutable]
final class Configuration
{
@ -45,11 +43,6 @@ final class Configuration
* @var bool
*/
private $showDiffs = \true;
/**
* @readonly
* @var \Rector\Core\ValueObject\Bootstrap\BootstrapConfigs|null
*/
private $bootstrapConfigs;
/**
* @readonly
* @var string|null
@ -71,7 +64,7 @@ final class Configuration
* @param string|null $parallelPort
* @param string|null $parallelIdentifier
*/
public function __construct(bool $isDryRun = \false, bool $showProgressBar = \true, bool $shouldClearCache = \false, string $outputFormat = \Rector\ChangesReporting\Output\ConsoleOutputFormatter::NAME, array $fileExtensions = ['php'], array $paths = [], bool $showDiffs = \true, ?\Rector\Core\ValueObject\Bootstrap\BootstrapConfigs $bootstrapConfigs = null, $parallelPort = null, $parallelIdentifier = null, bool $isParallel = \false)
public function __construct(bool $isDryRun = \false, bool $showProgressBar = \true, bool $shouldClearCache = \false, string $outputFormat = \Rector\ChangesReporting\Output\ConsoleOutputFormatter::NAME, array $fileExtensions = ['php'], array $paths = [], bool $showDiffs = \true, $parallelPort = null, $parallelIdentifier = null, bool $isParallel = \false)
{
$this->isDryRun = $isDryRun;
$this->showProgressBar = $showProgressBar;
@ -80,7 +73,6 @@ final class Configuration
$this->fileExtensions = $fileExtensions;
$this->paths = $paths;
$this->showDiffs = $showDiffs;
$this->bootstrapConfigs = $bootstrapConfigs;
$this->parallelPort = $parallelPort;
$this->parallelIdentifier = $parallelIdentifier;
$this->isParallel = $isParallel;
@ -119,18 +111,6 @@ final class Configuration
{
return $this->showDiffs;
}
public function getMainConfigFilePath() : ?string
{
if ($this->bootstrapConfigs === null) {
return null;
}
$mainConfigFile = $this->bootstrapConfigs->getMainConfigFile();
if (!\is_string($mainConfigFile)) {
return null;
}
$mainConfigFileInfo = new \Symplify\SmartFileSystem\SmartFileInfo($mainConfigFile);
return $mainConfigFileInfo->getRelativeFilePathFromCwd();
}
public function getParallelPort() : ?string
{
return $this->parallelPort;
@ -143,11 +123,4 @@ final class Configuration
{
return $this->isParallel;
}
/**
* @return string|null
*/
public function getConfig()
{
return $this->getMainConfigFilePath();
}
}

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747
class ComposerAutoloaderInitdee307f2a8c055650fa59d4c018b6066
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitdee307f2a8c055650fa59d4c018b6066', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitdee307f2a8c055650fa59d4c018b6066', '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\ComposerStaticInit53331b101b45a9a0e15c7c77733ca747::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitdee307f2a8c055650fa59d4c018b6066::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,12 +42,12 @@ class ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit53331b101b45a9a0e15c7c77733ca747::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitdee307f2a8c055650fa59d4c018b6066::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire53331b101b45a9a0e15c7c77733ca747($fileIdentifier, $file);
composerRequiredee307f2a8c055650fa59d4c018b6066($fileIdentifier, $file);
}
return $loader;
@ -59,7 +59,7 @@ class ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747
* @param string $file
* @return void
*/
function composerRequire53331b101b45a9a0e15c7c77733ca747($fileIdentifier, $file)
function composerRequiredee307f2a8c055650fa59d4c018b6066($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

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

View File

@ -1012,17 +1012,17 @@
},
{
"name": "phpstan\/phpstan",
"version": "1.3.2",
"version_normalized": "1.3.2.0",
"version": "1.3.3",
"version_normalized": "1.3.3.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
"reference": "84eaa569d48ea79d3bebe2c3ec5d302537a6ae8a"
"reference": "151a51f6149855785fbd883e79768c0abc96b75f"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/84eaa569d48ea79d3bebe2c3ec5d302537a6ae8a",
"reference": "84eaa569d48ea79d3bebe2c3ec5d302537a6ae8a",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/151a51f6149855785fbd883e79768c0abc96b75f",
"reference": "151a51f6149855785fbd883e79768c0abc96b75f",
"shasum": ""
},
"require": {
@ -1031,7 +1031,7 @@
"conflict": {
"phpstan\/phpstan-shim": "*"
},
"time": "2022-01-06T17:11:15+00:00",
"time": "2022-01-07T09:49:03+00:00",
"bin": [
"phpstan",
"phpstan.phar"
@ -1055,7 +1055,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https:\/\/github.com\/phpstan\/phpstan\/issues",
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.3.2"
"source": "https:\/\/github.com\/phpstan\/phpstan\/tree\/1.3.3"
},
"funding": [
{

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmHXIrMACgkQzxoQjQ56
5yDxSQ//aQCmImNh4Bp0rTLH9wr4RWymWS5VYMsAif9IcaI7rgYranZFt6z2Tjcy
uR7NNa6EumExgY4fZvQ8XF/4P36ckyk+z6mCPhd4YiM8xswNFq6jdOgNzOAQATS3
fWdEaQHiwx2ffb+saoz85BUIEv4w4AUjSja5CpZuavw/MFTrMEsUTuak10yfvnZ/
YPkxQgEmvJ2fh66F2nIfOFLj/QFnepFaiEeUEgi0JWkYW7pa/TXSJ0ESf6pIt057
PuAI1XaDlBhYOx+Vw8N0IRPhedz6tKL3t8Qwoi5Sp+gvJA1Z40n7KwQv57XMWGto
4w50K2WEwnmDLME6cmw0CwZEeu+vNsbdReZlpIkyBj9TNxbpZ8MPgXxAcuG3gTwX
+mkgvRE7od20iyAZCmPe/wiNr3RhaIbcn0ZGjixvW3FwX0WUfYUkbATHUPwI785H
bvdmjP4YeHqd9HGWfCdthpzLATdxSoCtR7ZqopU1cMwyq70zu8heA4hg6nxZYBT3
1HkYpjklKgXoKMbww+miP+0hcbNXE19KNNGT9XWCmgQXXFT9UG7389dhptnep1Aj
aQ0gWVBQ5PT9kFjetmu7fuAYQgDFjXvyprlRaYTwStpiy5gaq8ON72KXUky0jI9f
a2AUoF/irs7asRJuadWGwjcgMcxGNssvxmhIrp1fmjzaBtXlbqk=
=r+5D
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmHYDI4ACgkQzxoQjQ56
5yDZKA/8CdsoOocXxJvA9aJZSCszu7+/l5AZFTKjemR1hbpsiHCHfqDkdFZGYd3j
j1FZkYn6yyiJnY+WfEfwYjqtscoDcyfaunONrmOtw3iDUrxXkla60SBxN2b1sufA
jnkg2iKXksTh4Xxh6frHxo6uqRVweW60FPDfA//DaJgAASiSP+YA2Wl8iVyVNS8L
C4Xs4Jwp21TUlnRndCa4QSZLOPzdnypc3yfNfF1mCv1CeU5f2BWWjCH8ErikRTWy
61rSfDA8wHEvrpLC5ktu/Qk5f1XwZyw306q7O30BwwtzSFg6d5KagXU7nDIwLPhd
DD2bPW8DI3wV+1cXxigUEmJTMaYKSQflh+B7VU6gmFwN2bPdILBb6GIGPYGVJace
LZ3nL7t8qEmxlzrx/xmEobZn/KZ4j+dykgrLHojb7zAwiliLFAFuG99M+PLUWhVv
xfj58D+HtE5si3d7E4sbJIZHs9BVmeFShlG5pMYIKMq5XRyr0aZLdNUBchJdINTS
9iVF5vQcpYKpe1EMa90k1SqYW/02oDuOia2mMhmXZNQnpQBnTRoem5JgSAmBRkP2
0Utsx37ieHdPFzT5cP8/USE0ojxYWboG05CVcaL7ez8VYj2qFQTkfwLVF0sACHqb
VPXxBweKES0ZBXbeD8Im2ArLvWP4aEKmD7R/yn7fqICKLJuR9iM=
=hEnx
-----END PGP SIGNATURE-----

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20220107\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747', false) && !interface_exists('ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747', false) && !trait_exists('ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747', false)) {
spl_autoload_call('RectorPrefix20220107\ComposerAutoloaderInit53331b101b45a9a0e15c7c77733ca747');
if (!class_exists('ComposerAutoloaderInitdee307f2a8c055650fa59d4c018b6066', false) && !interface_exists('ComposerAutoloaderInitdee307f2a8c055650fa59d4c018b6066', false) && !trait_exists('ComposerAutoloaderInitdee307f2a8c055650fa59d4c018b6066', false)) {
spl_autoload_call('RectorPrefix20220107\ComposerAutoloaderInitdee307f2a8c055650fa59d4c018b6066');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20220107\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -71,9 +71,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220107\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire53331b101b45a9a0e15c7c77733ca747')) {
function composerRequire53331b101b45a9a0e15c7c77733ca747() {
return \RectorPrefix20220107\composerRequire53331b101b45a9a0e15c7c77733ca747(...func_get_args());
if (!function_exists('composerRequiredee307f2a8c055650fa59d4c018b6066')) {
function composerRequiredee307f2a8c055650fa59d4c018b6066() {
return \RectorPrefix20220107\composerRequiredee307f2a8c055650fa59d4c018b6066(...func_get_args());
}
}
if (!function_exists('scanPath')) {