Updated Rector to commit 2fe68ad7649faf0ebec883dcdeb91ee6118297ce

2fe68ad764 [DI] Add resetable interface to reset services on new DI run (#4790)
This commit is contained in:
Tomas Votruba 2023-08-14 13:46:38 +00:00
parent 846609aadf
commit 8216388351
13 changed files with 56 additions and 34 deletions

View File

@ -9,12 +9,13 @@ use PHPStan\Php\PhpVersion;
use PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher;
use PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocator;
use PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceLocator;
use Rector\Core\Contract\DependencyInjection\ResetableInterface;
use Rector\Testing\PHPUnit\StaticPHPUnitEnvironment;
use RectorPrefix202308\Webmozart\Assert\Assert;
/**
* @api phpstan external
*/
final class DynamicSourceLocatorProvider
final class DynamicSourceLocatorProvider implements ResetableInterface
{
/**
* @readonly

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '98b203a5d9caa1aacb75bb22a45617f228c3516a';
public const PACKAGE_VERSION = '2fe68ad7649faf0ebec883dcdeb91ee6118297ce';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-14 10:09:07';
public const RELEASE_DATE = '2023-08-14 13:42:14';
/**
* @var int
*/

View File

@ -4,7 +4,8 @@ declare (strict_types=1);
namespace Rector\Core\Configuration;
use PHPStan\Type\ObjectType;
final class RenamedClassesDataCollector
use Rector\Core\Contract\DependencyInjection\ResetableInterface;
final class RenamedClassesDataCollector implements ResetableInterface
{
/**
* @var array<string, string>
@ -46,4 +47,8 @@ final class RenamedClassesDataCollector
{
return \array_keys($this->oldToNewClasses);
}
public function reset() : void
{
$this->oldToNewClasses = [];
}
}

View File

@ -0,0 +1,9 @@
<?php
declare (strict_types=1);
namespace Rector\Core\Contract\DependencyInjection;
interface ResetableInterface
{
public function reset() : void;
}

View File

@ -47,6 +47,7 @@ use Rector\Core\Application\ChangedNodeScopeRefresher;
use Rector\Core\Application\FileProcessor\PhpFileProcessor;
use Rector\Core\Configuration\ConfigInitializer;
use Rector\Core\Configuration\CurrentNodeProvider;
use Rector\Core\Configuration\RenamedClassesDataCollector;
use Rector\Core\Console\Command\ListRulesCommand;
use Rector\Core\Console\Command\ProcessCommand;
use Rector\Core\Console\Command\SetupCICommand;
@ -55,6 +56,7 @@ use Rector\Core\Console\ConsoleApplication;
use Rector\Core\Console\Output\OutputFormatterCollector;
use Rector\Core\Console\Style\RectorStyle;
use Rector\Core\Console\Style\SymfonyStyleFactory;
use Rector\Core\Contract\DependencyInjection\ResetableInterface;
use Rector\Core\Contract\Processor\FileProcessorInterface;
use Rector\Core\Contract\Rector\PhpRectorInterface;
use Rector\Core\Contract\Rector\RectorInterface;
@ -292,6 +294,9 @@ final class LazyContainerFactory
$phpStanServicesFactory = $container->make(PHPStanServicesFactory::class);
return $phpStanServicesFactory->createDynamicSourceLocatorProvider();
});
// resetables
$lazyRectorConfig->tag(DynamicSourceLocatorProvider::class, ResetableInterface::class);
$lazyRectorConfig->tag(RenamedClassesDataCollector::class, ResetableInterface::class);
// caching
$lazyRectorConfig->singleton(Cache::class, static function (Container $container) : Cache {
/** @var CacheFactory $cacheFactory */

2
vendor/autoload.php vendored
View File

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

View File

@ -1486,6 +1486,7 @@ return array(
'Rector\\Core\\Console\\ProcessConfigureDecorator' => $baseDir . '/src/Console/ProcessConfigureDecorator.php',
'Rector\\Core\\Console\\Style\\RectorStyle' => $baseDir . '/src/Console/Style/RectorStyle.php',
'Rector\\Core\\Console\\Style\\SymfonyStyleFactory' => $baseDir . '/src/Console/Style/SymfonyStyleFactory.php',
'Rector\\Core\\Contract\\DependencyInjection\\ResetableInterface' => $baseDir . '/src/Contract/DependencyInjection/ResetableInterface.php',
'Rector\\Core\\Contract\\PHPStan\\Reflection\\TypeToCallReflectionResolver\\TypeToCallReflectionResolverInterface' => $baseDir . '/src/Contract/PHPStan/Reflection/TypeToCallReflectionResolver/TypeToCallReflectionResolverInterface.php',
'Rector\\Core\\Contract\\PhpParser\\Node\\StmtsAwareInterface' => $baseDir . '/src/Contract/PhpParser/Node/StmtsAwareInterface.php',
'Rector\\Core\\Contract\\Processor\\FileProcessorInterface' => $baseDir . '/src/Contract/Processor/FileProcessorInterface.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit2730a0a44b463269d6ca3be1f5a2a0f8
class ComposerAutoloaderInitef003b203866411843a8ebe2ebc6e04a
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit2730a0a44b463269d6ca3be1f5a2a0f8
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit2730a0a44b463269d6ca3be1f5a2a0f8', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitef003b203866411843a8ebe2ebc6e04a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit2730a0a44b463269d6ca3be1f5a2a0f8', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitef003b203866411843a8ebe2ebc6e04a', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitef003b203866411843a8ebe2ebc6e04a::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitef003b203866411843a8ebe2ebc6e04a::$files;
$requireFile = \Closure::bind(static function ($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 ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8
class ComposerStaticInitef003b203866411843a8ebe2ebc6e04a
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -1739,6 +1739,7 @@ class ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8
'Rector\\Core\\Console\\ProcessConfigureDecorator' => __DIR__ . '/../..' . '/src/Console/ProcessConfigureDecorator.php',
'Rector\\Core\\Console\\Style\\RectorStyle' => __DIR__ . '/../..' . '/src/Console/Style/RectorStyle.php',
'Rector\\Core\\Console\\Style\\SymfonyStyleFactory' => __DIR__ . '/../..' . '/src/Console/Style/SymfonyStyleFactory.php',
'Rector\\Core\\Contract\\DependencyInjection\\ResetableInterface' => __DIR__ . '/../..' . '/src/Contract/DependencyInjection/ResetableInterface.php',
'Rector\\Core\\Contract\\PHPStan\\Reflection\\TypeToCallReflectionResolver\\TypeToCallReflectionResolverInterface' => __DIR__ . '/../..' . '/src/Contract/PHPStan/Reflection/TypeToCallReflectionResolver/TypeToCallReflectionResolverInterface.php',
'Rector\\Core\\Contract\\PhpParser\\Node\\StmtsAwareInterface' => __DIR__ . '/../..' . '/src/Contract/PhpParser/Node/StmtsAwareInterface.php',
'Rector\\Core\\Contract\\Processor\\FileProcessorInterface' => __DIR__ . '/../..' . '/src/Contract/Processor/FileProcessorInterface.php',
@ -2958,9 +2959,9 @@ class ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit2730a0a44b463269d6ca3be1f5a2a0f8::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitef003b203866411843a8ebe2ebc6e04a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitef003b203866411843a8ebe2ebc6e04a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitef003b203866411843a8ebe2ebc6e04a::$classMap;
}, null, ClassLoader::class);
}

View File

@ -908,17 +908,17 @@
},
{
"name": "phpstan\/phpstan",
"version": "1.10.28",
"version_normalized": "1.10.28.0",
"version": "1.10.29",
"version_normalized": "1.10.29.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
"reference": "e4545b55904ebef470423d3ddddb74fa7325497a"
"reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/e4545b55904ebef470423d3ddddb74fa7325497a",
"reference": "e4545b55904ebef470423d3ddddb74fa7325497a",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1",
"reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1",
"shasum": ""
},
"require": {
@ -927,7 +927,7 @@
"conflict": {
"phpstan\/phpstan-shim": "*"
},
"time": "2023-08-08T12:33:42+00:00",
"time": "2023-08-14T13:24:11+00:00",
"bin": [
"phpstan",
"phpstan.phar"

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmTSNgUACgkQUcZzBf/C
5cA8rw/9EPjeTcTM6JkrBgoTxcowt5dQyQIlihqHZTymzi+sHyDRbCoE4/jXRRYL
xDbyKn6rb0klsdRkWtcfPmz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