Updated Rector to commit f1b74a41f07d1d8a30cf9b3e88380fc8614d80e9

f1b74a41f0 [NodeTypeResolver] Remove autowire on PropertyTypeResolver (#4360)
This commit is contained in:
Tomas Votruba 2023-06-27 07:46:43 +00:00
parent 2528c0753a
commit a6ecff6865
5 changed files with 18 additions and 22 deletions

View File

@ -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<class-string<Node>>
@ -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);
}
}

View File

@ -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
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -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;

View File

@ -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);
}