Updated Rector to commit 373afbaadd

373afbaadd [Parallel] Fix system errors expected an instance of SystemError but got string (#1610)
This commit is contained in:
Tomas Votruba 2022-01-04 13:23:36 +00:00
parent f56607d315
commit 36ab25f533
11 changed files with 47 additions and 36 deletions

View File

@ -69,6 +69,7 @@ final class ParallelFileProcessor
$numberOfProcesses = $schedule->getNumberOfProcesses();
// initial counters
$fileDiffs = [];
/** @var SystemError[] $systemErrors */
$systemErrors = [];
$tcpServer = new \RectorPrefix20220104\React\Socket\TcpServer('127.0.0.1:0', $streamSelectLoop);
$this->processPool = new \RectorPrefix20220104\Symplify\EasyParallel\ValueObject\ProcessPool($tcpServer);
@ -117,7 +118,7 @@ final class ParallelFileProcessor
// decode arrays to objects
foreach ($json[\Rector\Parallel\ValueObject\Bridge::SYSTEM_ERRORS] as $jsonError) {
if (\is_string($jsonError)) {
$systemErrors[] = 'System error: ' . $jsonError;
$systemErrors[] = new \Rector\Core\ValueObject\Error\SystemError('System error: ' . $jsonError);
continue;
}
$systemErrors[] = \Rector\Core\ValueObject\Error\SystemError::decode($jsonError);
@ -149,14 +150,14 @@ final class ParallelFileProcessor
if ($exitCode === null) {
return;
}
$systemErrors[] = 'Child process error: ' . $stdErr;
$systemErrors[] = new \Rector\Core\ValueObject\Error\SystemError('Child process error: ' . $stdErr);
}
);
$this->processPool->attachProcess($processIdentifier, $parallelProcess);
}
$streamSelectLoop->run();
if ($reachedSystemErrorsCountLimit) {
$systemErrors[] = \sprintf('Reached system errors count limit of %d, exiting...', self::SYSTEM_ERROR_COUNT_LIMIT);
$systemErrors[] = new \Rector\Core\ValueObject\Error\SystemError(\sprintf('Reached system errors count limit of %d, exiting...', self::SYSTEM_ERROR_COUNT_LIMIT));
}
return [\Rector\Parallel\ValueObject\Bridge::FILE_DIFFS => $fileDiffs, \Rector\Parallel\ValueObject\Bridge::SYSTEM_ERRORS => $systemErrors, \Rector\Parallel\ValueObject\Bridge::SYSTEM_ERRORS_COUNT => \count($systemErrors)];
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '63908627ce59ed20709341ee5180d4ff9cda1030';
public const PACKAGE_VERSION = '373afbaadd32088d98f2f1a38107836eeb038e89';
/**
* @var string
*/
public const RELEASE_DATE = '2022-01-04 10:20:37';
public const RELEASE_DATE = '2022-01-04 14:13:46';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220104\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -14,9 +14,9 @@ final class SystemError implements \RectorPrefix20220104\Symplify\EasyParallel\C
private $message;
/**
* @readonly
* @var string
* @var string|null
*/
private $relativeFilePath;
private $relativeFilePath = null;
/**
* @readonly
* @var int|null
@ -28,10 +28,11 @@ final class SystemError implements \RectorPrefix20220104\Symplify\EasyParallel\C
*/
private $rectorClass = null;
/**
* @param string|null $relativeFilePath
* @param int|null $line
* @param string|null $rectorClass
*/
public function __construct(string $message, string $relativeFilePath, $line = null, $rectorClass = null)
public function __construct(string $message, $relativeFilePath = null, $line = null, $rectorClass = null)
{
$this->message = $message;
$this->relativeFilePath = $relativeFilePath;
@ -42,7 +43,10 @@ final class SystemError implements \RectorPrefix20220104\Symplify\EasyParallel\C
{
return $this->message;
}
public function getFile() : string
/**
* @return string|null
*/
public function getFile()
{
return $this->relativeFilePath;
}
@ -58,7 +62,7 @@ final class SystemError implements \RectorPrefix20220104\Symplify\EasyParallel\C
return $this->relativeFilePath . ':' . $this->line;
}
/**
* @return array{message: string, relative_file_path: string, line: int|null, rector_class: string|null}
* @return array{message: string, relative_file_path: string|null, line: int|null, rector_class: string|null}
*/
public function jsonSerialize() : array
{

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3
class ComposerAutoloaderInit690b0ef5a80e46b80f11cf1ae276422e
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit690b0ef5a80e46b80f11cf1ae276422e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit690b0ef5a80e46b80f11cf1ae276422e', '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\ComposerStaticInit01b39444e47a1d49f7cd94c54e438ec3::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit690b0ef5a80e46b80f11cf1ae276422e::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,12 +42,12 @@ class ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit01b39444e47a1d49f7cd94c54e438ec3::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit690b0ef5a80e46b80f11cf1ae276422e::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire01b39444e47a1d49f7cd94c54e438ec3($fileIdentifier, $file);
composerRequire690b0ef5a80e46b80f11cf1ae276422e($fileIdentifier, $file);
}
return $loader;
@ -59,7 +59,7 @@ class ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3
* @param string $file
* @return void
*/
function composerRequire01b39444e47a1d49f7cd94c54e438ec3($fileIdentifier, $file)
function composerRequire690b0ef5a80e46b80f11cf1ae276422e($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 ComposerStaticInit01b39444e47a1d49f7cd94c54e438ec3
class ComposerStaticInit690b0ef5a80e46b80f11cf1ae276422e
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -3850,9 +3850,9 @@ class ComposerStaticInit01b39444e47a1d49f7cd94c54e438ec3
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit01b39444e47a1d49f7cd94c54e438ec3::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit01b39444e47a1d49f7cd94c54e438ec3::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit01b39444e47a1d49f7cd94c54e438ec3::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit690b0ef5a80e46b80f11cf1ae276422e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit690b0ef5a80e46b80f11cf1ae276422e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit690b0ef5a80e46b80f11cf1ae276422e::$classMap;
}, null, ClassLoader::class);
}

View File

@ -143,17 +143,17 @@
},
{
"name": "composer\/semver",
"version": "3.2.6",
"version_normalized": "3.2.6.0",
"version": "3.2.7",
"version_normalized": "3.2.7.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/composer\/semver.git",
"reference": "83e511e247de329283478496f7a1e114c9517506"
"reference": "deac27056b57e46faf136fae7b449eeaa71661ee"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/composer\/semver\/zipball\/83e511e247de329283478496f7a1e114c9517506",
"reference": "83e511e247de329283478496f7a1e114c9517506",
"url": "https:\/\/api.github.com\/repos\/composer\/semver\/zipball\/deac27056b57e46faf136fae7b449eeaa71661ee",
"reference": "deac27056b57e46faf136fae7b449eeaa71661ee",
"shasum": ""
},
"require": {
@ -163,7 +163,7 @@
"phpstan\/phpstan": "^0.12.54",
"symfony\/phpunit-bridge": "^4.2 || ^5"
},
"time": "2021-10-25T11:34:17+00:00",
"time": "2022-01-04T09:57:54+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -207,7 +207,7 @@
"support": {
"irc": "irc:\/\/irc.freenode.org\/composer",
"issues": "https:\/\/github.com\/composer\/semver\/issues",
"source": "https:\/\/github.com\/composer\/semver\/tree\/3.2.6"
"source": "https:\/\/github.com\/composer\/semver\/tree\/3.2.7"
},
"funding": [
{

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
### [3.2.7] 2022-01-04
* Fixed: typo in type definition of Intervals class causing issues with Psalm scanning vendors
### [3.2.6] 2021-10-25
* Fixed: type improvements to parseStability
@ -149,6 +153,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Namespace: `Composer\Test\Package\LinkConstraint` -> `Composer\Test\Semver\Constraint`
* Changed: code style using php-cs-fixer.
[3.2.7]: https://github.com/composer/semver/compare/3.2.6...3.2.7
[3.2.6]: https://github.com/composer/semver/compare/3.2.5...3.2.6
[3.2.5]: https://github.com/composer/semver/compare/3.2.4...3.2.5
[3.2.4]: https://github.com/composer/semver/compare/3.2.3...3.2.4
[3.2.3]: https://github.com/composer/semver/compare/3.2.2...3.2.3

View File

@ -363,7 +363,7 @@ class Intervals
return array('numeric' => $intervals, 'branches' => $branches);
}
/**
* @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}}
* @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
*/
private static function generateSingleConstraintIntervals(\RectorPrefix20220104\Composer\Semver\Constraint\Constraint $constraint)
{

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('RectorPrefix20220104\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3', false) && !interface_exists('ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3', false) && !trait_exists('ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3', false)) {
spl_autoload_call('RectorPrefix20220104\ComposerAutoloaderInit01b39444e47a1d49f7cd94c54e438ec3');
if (!class_exists('ComposerAutoloaderInit690b0ef5a80e46b80f11cf1ae276422e', false) && !interface_exists('ComposerAutoloaderInit690b0ef5a80e46b80f11cf1ae276422e', false) && !trait_exists('ComposerAutoloaderInit690b0ef5a80e46b80f11cf1ae276422e', false)) {
spl_autoload_call('RectorPrefix20220104\ComposerAutoloaderInit690b0ef5a80e46b80f11cf1ae276422e');
}
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('RectorPrefix20220104\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -78,9 +78,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220104\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire01b39444e47a1d49f7cd94c54e438ec3')) {
function composerRequire01b39444e47a1d49f7cd94c54e438ec3() {
return \RectorPrefix20220104\composerRequire01b39444e47a1d49f7cd94c54e438ec3(...func_get_args());
if (!function_exists('composerRequire690b0ef5a80e46b80f11cf1ae276422e')) {
function composerRequire690b0ef5a80e46b80f11cf1ae276422e() {
return \RectorPrefix20220104\composerRequire690b0ef5a80e46b80f11cf1ae276422e(...func_get_args());
}
}
if (!function_exists('scanPath')) {