Updated Rector to commit ca44648a7a280a7693d73a5d3a973480715c5a0f

ca44648a7a refletc json output formatter in fatal error on container creationg
This commit is contained in:
Tomas Votruba 2021-07-06 12:28:45 +00:00
parent 3910e49c60
commit 8343c436d8
6 changed files with 34 additions and 22 deletions

View File

@ -3,7 +3,10 @@
declare (strict_types=1);
namespace RectorPrefix20210706;
use RectorPrefix20210706\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\SymfonyStyleFactory;
use Rector\Core\DependencyInjection\RectorContainerFactory;
@ -31,15 +34,24 @@ require_once __DIR__ . '/../src/constants.php';
$autoloadIncluder->loadIfExistsAndNotLoadedYet(__DIR__ . '/../vendor/scoper-autoload.php');
$autoloadIncluder->autoloadProjectAutoloaderFile();
$autoloadIncluder->autoloadFromCommandLine();
$symfonyStyleFactory = new \Rector\Core\Console\Style\SymfonyStyleFactory(new \RectorPrefix20210706\Symplify\PackageBuilder\Reflection\PrivatesCaller());
$symfonyStyle = $symfonyStyleFactory->create();
$rectorConfigsResolver = new \Rector\Core\Bootstrap\RectorConfigsResolver();
try {
$bootstrapConfigs = $rectorConfigsResolver->provide();
$rectorContainerFactory = new \Rector\Core\DependencyInjection\RectorContainerFactory();
$container = $rectorContainerFactory->createFromBootstrapConfigs($bootstrapConfigs);
} catch (\Throwable $throwable) {
$symfonyStyle->error($throwable->getMessage());
// for json output
$argvInput = new \RectorPrefix20210706\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 \RectorPrefix20210706\Nette\Utils\Json::encode(['fatal_errors' => [$throwable->getMessage()]]);
} else {
// report fatal errors in console format
$symfonyStyleFactory = new \Rector\Core\Console\Style\SymfonyStyleFactory(new \RectorPrefix20210706\Symplify\PackageBuilder\Reflection\PrivatesCaller());
$symfonyStyle = $symfonyStyleFactory->create();
$symfonyStyle->error($throwable->getMessage());
}
exit(\RectorPrefix20210706\Symplify\PackageBuilder\Console\ShellCode::ERROR);
}
/** @var ConsoleApplication $application */

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '95e6a5e628ff75f3d66805ca3f952e15b9605d5c';
public const PACKAGE_VERSION = 'ca44648a7a280a7693d73a5d3a973480715c5a0f';
/**
* @var string
*/
public const RELEASE_DATE = '2021-07-06 13:31:16';
public const RELEASE_DATE = '2021-07-06 14:20:54';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20210706\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69
class ComposerAutoloaderInite7aa8a269d13728d8196257ca9846cd1
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInite7aa8a269d13728d8196257ca9846cd1', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInite7aa8a269d13728d8196257ca9846cd1', '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\ComposerStaticInitf7c6e767b95b474d479550aa8bf62f69::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInite7aa8a269d13728d8196257ca9846cd1::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitf7c6e767b95b474d479550aa8bf62f69::$files;
$includeFiles = Composer\Autoload\ComposerStaticInite7aa8a269d13728d8196257ca9846cd1::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiref7c6e767b95b474d479550aa8bf62f69($fileIdentifier, $file);
composerRequiree7aa8a269d13728d8196257ca9846cd1($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequiref7c6e767b95b474d479550aa8bf62f69($fileIdentifier, $file)
function composerRequiree7aa8a269d13728d8196257ca9846cd1($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

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

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('RectorPrefix20210706\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69', false) && !interface_exists('ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69', false) && !trait_exists('ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69', false)) {
spl_autoload_call('RectorPrefix20210706\ComposerAutoloaderInitf7c6e767b95b474d479550aa8bf62f69');
if (!class_exists('ComposerAutoloaderInite7aa8a269d13728d8196257ca9846cd1', false) && !interface_exists('ComposerAutoloaderInite7aa8a269d13728d8196257ca9846cd1', false) && !trait_exists('ComposerAutoloaderInite7aa8a269d13728d8196257ca9846cd1', false)) {
spl_autoload_call('RectorPrefix20210706\ComposerAutoloaderInite7aa8a269d13728d8196257ca9846cd1');
}
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
spl_autoload_call('RectorPrefix20210706\Doctrine\Inflector\Inflector');
@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20210706\print_node(...func_get_args());
}
}
if (!function_exists('composerRequiref7c6e767b95b474d479550aa8bf62f69')) {
function composerRequiref7c6e767b95b474d479550aa8bf62f69() {
return \RectorPrefix20210706\composerRequiref7c6e767b95b474d479550aa8bf62f69(...func_get_args());
if (!function_exists('composerRequiree7aa8a269d13728d8196257ca9846cd1')) {
function composerRequiree7aa8a269d13728d8196257ca9846cd1() {
return \RectorPrefix20210706\composerRequiree7aa8a269d13728d8196257ca9846cd1(...func_get_args());
}
}
if (!function_exists('parseArgs')) {