Skip to content

Commit

Permalink
Updated Rector to commit bdf11c5
Browse files Browse the repository at this point in the history
rectorphp/rector-src@bdf11c5 [DX] Add deprecation exception about old ContainerConfigurator, to prepare for removal even in CI
  • Loading branch information
TomasVotruba committed Jun 9, 2022
1 parent bfad534 commit f188888
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
10 changes: 3 additions & 7 deletions src/DependencyInjection/RectorContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
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
Expand All @@ -20,12 +20,8 @@ public function createFromBootstrapConfigs(BootstrapConfigs $bootstrapConfigs) :
// 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);
Expand Down
9 changes: 9 additions & 0 deletions src/Exception/DeprecatedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare (strict_types=1);
namespace Rector\Core\Exception;

use Exception;
final class DeprecatedException extends Exception
{
}
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c::getLoader();
return ComposerAutoloaderInit972f9cc9d371b6943612c276c0ae560a::getLoader();
1 change: 1 addition & 0 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,7 @@
'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',
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitc3ec4e514d5835c03bacc44bd264930c
class ComposerAutoloaderInit972f9cc9d371b6943612c276c0ae560a
{
private static $loader;

Expand All @@ -22,19 +22,19 @@ public static function getLoader()
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;
Expand All @@ -46,7 +46,7 @@ public static function getLoader()
* @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;
Expand Down
9 changes: 5 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitc3ec4e514d5835c03bacc44bd264930c
class ComposerStaticInit972f9cc9d371b6943612c276c0ae560a
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f188888

Please sign in to comment.