From ea0464beb99e8f9f62753533201708083d144d6c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 17 Apr 2024 08:35:57 +0000 Subject: [PATCH] Updated Rector to commit 8cf4340f3e9ace06e20827147e1065cfd5182efa https://github.com/rectorphp/rector-src/commit/8cf4340f3e9ace06e20827147e1065cfd5182efa [TypeDeclaration] Handle crash on @mixin usage on ReturnTypeFromStrictTypedCallRector (#5823) --- src/Application/VersionResolver.php | 4 ++-- src/DependencyInjection/LazyContainerFactory.php | 6 ++++++ vendor/scoper-autoload.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3ce064d18d0..364cb4dade3 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '2b811afb584aa7a3c569a2ce23d78edbf126d556'; + public const PACKAGE_VERSION = '8cf4340f3e9ace06e20827147e1065cfd5182efa'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-15 19:25:17'; + public const RELEASE_DATE = '2024-04-17 15:33:21'; /** * @var int */ diff --git a/src/DependencyInjection/LazyContainerFactory.php b/src/DependencyInjection/LazyContainerFactory.php index 1525e3ecc09..48fcdde9f5e 100644 --- a/src/DependencyInjection/LazyContainerFactory.php +++ b/src/DependencyInjection/LazyContainerFactory.php @@ -348,6 +348,12 @@ final class LazyContainerFactory $rectorConfig->afterResolving(NameScopeFactory::class, static function (NameScopeFactory $nameScopeFactory, Container $container) : void { $nameScopeFactory->autowire($container->make(PhpDocInfoFactory::class), $container->make(StaticTypeMapper::class)); }); + $rectorConfig->afterResolving(TypeMapperInterface::class, static function (TypeMapperInterface $typeMapper, Container $container) : void { + if (!\method_exists($typeMapper, 'autowire')) { + return; + } + $typeMapper->autowire($container->make(PHPStanStaticTypeMapper::class)); + }); $rectorConfig->afterResolving(ArrayTypeMapper::class, static function (ArrayTypeMapper $arrayTypeMapper, Container $container) : void { $arrayTypeMapper->autowire($container->make(PHPStanStaticTypeMapper::class)); }); diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index c0ea5d90505..18fc9990667 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -14,7 +14,7 @@ $loader = (static function () { // Restore the backup and ensure the excluded files are properly marked as loaded $GLOBALS['__composer_autoload_files'] = \array_merge( $existingComposerAutoloadFiles, - \array_fill_keys(['0e6d7bf4a5811bfa5cf40c5ccd6fae6a', '5928a00fa978807cf85d90ec3f4b0147'], true) + \array_fill_keys(['5928a00fa978807cf85d90ec3f4b0147', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a'], true) ); return $loader;