From a6ecff6865dbeb543e343e9cca144732e6fb041c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 27 Jun 2023 07:46:43 +0000 Subject: [PATCH] Updated Rector to commit f1b74a41f07d1d8a30cf9b3e88380fc8614d80e9 https://github.com/rectorphp/rector-src/commit/f1b74a41f07d1d8a30cf9b3e88380fc8614d80e9 [NodeTypeResolver] Remove autowire on PropertyTypeResolver (#4360) --- .../NodeTypeResolver/PropertyTypeResolver.php | 16 ++++++---------- src/Application/VersionResolver.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/packages/NodeTypeResolver/NodeTypeResolver/PropertyTypeResolver.php b/packages/NodeTypeResolver/NodeTypeResolver/PropertyTypeResolver.php index 47c390d143a..f5ac1da8f76 100644 --- a/packages/NodeTypeResolver/NodeTypeResolver/PropertyTypeResolver.php +++ b/packages/NodeTypeResolver/NodeTypeResolver/PropertyTypeResolver.php @@ -10,8 +10,6 @@ use PhpParser\Node\Stmt\Property; use PHPStan\Type\Type; use Rector\NodeTypeResolver\Contract\NodeTypeResolverInterface; use Rector\NodeTypeResolver\Node\AttributeKey; -use Rector\NodeTypeResolver\NodeTypeResolver; -use RectorPrefix202306\Symfony\Contracts\Service\Attribute\Required; /** * @see \Rector\Tests\NodeTypeResolver\PerNodeTypeResolver\PropertyTypeResolver\PropertyTypeResolverTest * @@ -20,15 +18,13 @@ use RectorPrefix202306\Symfony\Contracts\Service\Attribute\Required; final class PropertyTypeResolver implements NodeTypeResolverInterface { /** - * @var \Rector\NodeTypeResolver\NodeTypeResolver + * @readonly + * @var \Rector\NodeTypeResolver\NodeTypeResolver\PropertyFetchTypeResolver */ - private $nodeTypeResolver; - /** - * @required - */ - public function autowire(NodeTypeResolver $nodeTypeResolver) : void + private $propertyFetchTypeResolver; + public function __construct(\Rector\NodeTypeResolver\NodeTypeResolver\PropertyFetchTypeResolver $propertyFetchTypeResolver) { - $this->nodeTypeResolver = $nodeTypeResolver; + $this->propertyFetchTypeResolver = $propertyFetchTypeResolver; } /** * @return array> @@ -45,6 +41,6 @@ final class PropertyTypeResolver implements NodeTypeResolverInterface // fake property to local PropertyFetch → PHPStan understands that $propertyFetch = new PropertyFetch(new Variable('this'), (string) $node->props[0]->name); $propertyFetch->setAttribute(AttributeKey::SCOPE, $node->getAttribute(AttributeKey::SCOPE)); - return $this->nodeTypeResolver->getType($propertyFetch); + return $this->propertyFetchTypeResolver->resolve($propertyFetch); } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index efa14186c0a..874eecb2637 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 = '5e20015ec5d8002b9a11f8bfa7c70f4f2a5b5c5d'; + public const PACKAGE_VERSION = 'f1b74a41f07d1d8a30cf9b3e88380fc8614d80e9'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-06-27 13:30:57'; + public const RELEASE_DATE = '2023-06-27 14:42:43'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index f5660522c68..8c760265c25 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInita6a0d3595a78bfd0ec59468f5dc68822::getLoader(); +return ComposerAutoloaderInitcdd6c94178448b7635568178dab85738::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index e8f78fccdb3..4e52d664371 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInita6a0d3595a78bfd0ec59468f5dc68822 +class ComposerAutoloaderInitcdd6c94178448b7635568178dab85738 { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInita6a0d3595a78bfd0ec59468f5dc68822 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInita6a0d3595a78bfd0ec59468f5dc68822', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcdd6c94178448b7635568178dab85738', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInita6a0d3595a78bfd0ec59468f5dc68822', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcdd6c94178448b7635568178dab85738', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInita6a0d3595a78bfd0ec59468f5dc68822::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitcdd6c94178448b7635568178dab85738::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInita6a0d3595a78bfd0ec59468f5dc68822::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitcdd6c94178448b7635568178dab85738::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 704aac8e0b8..810cbe94125 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInita6a0d3595a78bfd0ec59468f5dc68822 +class ComposerStaticInitcdd6c94178448b7635568178dab85738 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3098,9 +3098,9 @@ class ComposerStaticInita6a0d3595a78bfd0ec59468f5dc68822 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInita6a0d3595a78bfd0ec59468f5dc68822::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInita6a0d3595a78bfd0ec59468f5dc68822::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInita6a0d3595a78bfd0ec59468f5dc68822::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitcdd6c94178448b7635568178dab85738::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitcdd6c94178448b7635568178dab85738::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitcdd6c94178448b7635568178dab85738::$classMap; }, null, ClassLoader::class); }