Updated Rector to commit bdf11c5968

bdf11c5968 [DX] Add deprecation exception about old ContainerConfigurator, to prepare for removal even in CI
This commit is contained in:
Tomas Votruba 2022-06-09 10:19:12 +00:00
parent bfad5344a5
commit f188888181
7 changed files with 28 additions and 21 deletions

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'd1b7a49e35cd236f15ddb3010d2b91b065d094a5';
public const PACKAGE_VERSION = 'bdf11c5968b1304f809781f9023dc7a2cf3642ad';
/**
* @var string
*/
public const RELEASE_DATE = '2022-06-09 12:04:36';
public const RELEASE_DATE = '2022-06-09 12:14:06';
/**
* @var int
*/

View File

@ -7,9 +7,9 @@ use RectorPrefix20220609\Nette\Utils\FileSystem;
use RectorPrefix20220609\Psr\Container\ContainerInterface;
use Rector\Caching\Detector\ChangedFilesDetector;
use Rector\Core\Autoloading\BootstrapFilesIncluder;
use Rector\Core\Exception\DeprecatedException;
use Rector\Core\Kernel\RectorKernel;
use Rector\Core\ValueObject\Bootstrap\BootstrapConfigs;
use RectorPrefix20220609\Symfony\Component\Console\Style\SymfonyStyle;
final class RectorContainerFactory
{
public function createFromBootstrapConfigs(BootstrapConfigs $bootstrapConfigs) : ContainerInterface
@ -20,12 +20,8 @@ final class RectorContainerFactory
// warning about old syntax before RectorConfig
$fileContents = FileSystem::read($mainConfigFile);
if (\strpos($fileContents, 'ContainerConfigurator $containerConfigurator') !== \false) {
/** @var SymfonyStyle $symfonyStyle */
$symfonyStyle = $container->get(SymfonyStyle::class);
$warningMessage = \sprintf('Your "%s" config is using old syntax with "ContainerConfigurator".%sUpgrade to "RectorConfig" that allows better autocomplete and future standard: https://getrector.org/blog/new-in-rector-012-introducing-rector-config-with-autocomplete', $mainConfigFile, \PHP_EOL);
$symfonyStyle->error($warningMessage);
// to make message noticable
\sleep(10);
$warningMessage = \sprintf('Your "%s" config uses deprecated syntax with "ContainerConfigurator".%sUpgrade to "RectorConfig": https://getrector.org/blog/new-in-rector-012-introducing-rector-config-with-autocomplete', $mainConfigFile, \PHP_EOL);
throw new DeprecatedException($warningMessage);
}
/** @var ChangedFilesDetector $changedFilesDetector */
$changedFilesDetector = $container->get(ChangedFilesDetector::class);

View File

@ -0,0 +1,9 @@
<?php
declare (strict_types=1);
namespace Rector\Core\Exception;
use Exception;
final class DeprecatedException extends Exception
{
}

2
vendor/autoload.php vendored
View File

@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c::getLoader();
return ComposerAutoloaderInit972f9cc9d371b6943612c276c0ae560a::getLoader();

View File

@ -1547,6 +1547,7 @@ return array(
'Rector\\Core\\Error\\ExceptionCorrector' => $baseDir . '/src/Error/ExceptionCorrector.php',
'Rector\\Core\\Exception\\Cache\\CachingException' => $baseDir . '/src/Exception/Cache/CachingException.php',
'Rector\\Core\\Exception\\Configuration\\InvalidConfigurationException' => $baseDir . '/src/Exception/Configuration/InvalidConfigurationException.php',
'Rector\\Core\\Exception\\DeprecatedException' => $baseDir . '/src/Exception/DeprecatedException.php',
'Rector\\Core\\Exception\\NotImplementedYetException' => $baseDir . '/src/Exception/NotImplementedYetException.php',
'Rector\\Core\\Exception\\ShouldNotHappenException' => $baseDir . '/src/Exception/ShouldNotHappenException.php',
'Rector\\Core\\Exception\\VersionException' => $baseDir . '/src/Exception/VersionException.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c
class ComposerAutoloaderInit972f9cc9d371b6943612c276c0ae560a
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit972f9cc9d371b6943612c276c0ae560a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit972f9cc9d371b6943612c276c0ae560a', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit972f9cc9d371b6943612c276c0ae560a::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit972f9cc9d371b6943612c276c0ae560a::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirec3ec4e514d5835c03bacc44bd264930c($fileIdentifier, $file);
composerRequire972f9cc9d371b6943612c276c0ae560a($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c
* @param string $file
* @return void
*/
function composerRequirec3ec4e514d5835c03bacc44bd264930c($fileIdentifier, $file)
function composerRequire972f9cc9d371b6943612c276c0ae560a($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 ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c
class ComposerStaticInit972f9cc9d371b6943612c276c0ae560a
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -1848,6 +1848,7 @@ class ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c
'Rector\\Core\\Error\\ExceptionCorrector' => __DIR__ . '/../..' . '/src/Error/ExceptionCorrector.php',
'Rector\\Core\\Exception\\Cache\\CachingException' => __DIR__ . '/../..' . '/src/Exception/Cache/CachingException.php',
'Rector\\Core\\Exception\\Configuration\\InvalidConfigurationException' => __DIR__ . '/../..' . '/src/Exception/Configuration/InvalidConfigurationException.php',
'Rector\\Core\\Exception\\DeprecatedException' => __DIR__ . '/../..' . '/src/Exception/DeprecatedException.php',
'Rector\\Core\\Exception\\NotImplementedYetException' => __DIR__ . '/../..' . '/src/Exception/NotImplementedYetException.php',
'Rector\\Core\\Exception\\ShouldNotHappenException' => __DIR__ . '/../..' . '/src/Exception/ShouldNotHappenException.php',
'Rector\\Core\\Exception\\VersionException' => __DIR__ . '/../..' . '/src/Exception/VersionException.php',
@ -3389,9 +3390,9 @@ class ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit972f9cc9d371b6943612c276c0ae560a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit972f9cc9d371b6943612c276c0ae560a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit972f9cc9d371b6943612c276c0ae560a::$classMap;
}, null, ClassLoader::class);
}