From f955a2ddf9352145edd56a339f73146074018d98 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 23 Jul 2023 16:13:59 +0000 Subject: [PATCH] Updated Rector to commit 07934c889213adc8a63a4db60b23575440da30c9 https://github.com/rectorphp/rector-src/commit/07934c889213adc8a63a4db60b23575440da30c9 [PHPStanStaticTypeMapper] Remove manual type check on PHPStanStaticTypeMapper (#4583) --- .../PHPStanStaticTypeMapper.php | 17 ----------------- src/Application/VersionResolver.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- 5 files changed, 12 insertions(+), 29 deletions(-) diff --git a/packages/PHPStanStaticTypeMapper/PHPStanStaticTypeMapper.php b/packages/PHPStanStaticTypeMapper/PHPStanStaticTypeMapper.php index 67dac40fff10..60c433d999eb 100644 --- a/packages/PHPStanStaticTypeMapper/PHPStanStaticTypeMapper.php +++ b/packages/PHPStanStaticTypeMapper/PHPStanStaticTypeMapper.php @@ -6,13 +6,8 @@ use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\TypeNode; -use PHPStan\Type\Accessory\HasMethodType; -use PHPStan\Type\ConditionalType; -use PHPStan\Type\ObjectShapeType; use PHPStan\Type\Type; -use Rector\BetterPhpDocParser\ValueObject\Type\FullyQualifiedIdentifierTypeNode; use Rector\Core\Exception\NotImplementedYetException; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; use Rector\PHPStanStaticTypeMapper\Enum\TypeKind; @@ -38,18 +33,6 @@ public function mapToPHPStanPhpDocTypeNode(Type $type) : TypeNode } return $typeMapper->mapToPHPStanPhpDocTypeNode($type); } - if ($type->isString()->yes()) { - return new IdentifierTypeNode('string'); - } - if ($type instanceof HasMethodType) { - return new IdentifierTypeNode('object'); - } - if ($type instanceof ConditionalType) { - return new IdentifierTypeNode('mixed'); - } - if ($type instanceof ObjectShapeType) { - return new FullyQualifiedIdentifierTypeNode('stdClass'); - } throw new NotImplementedYetException(__METHOD__ . ' for ' . \get_class($type)); } /** diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index c532f0d2e27b..dc68ae10afab 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 = 'a8ae2d8c2a92536f95a70dc99eaebb01168c4a6f'; + public const PACKAGE_VERSION = '07934c889213adc8a63a4db60b23575440da30c9'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-07-23 17:08:46'; + public const RELEASE_DATE = '2023-07-23 17:09:53'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 948ed5d52b7c..71a11c5c0b96 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268::getLoader(); +return ComposerAutoloaderInit5ca5cf93238327764a56963c242c2c00::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index f164dc89fd24..da90c2bfadc9 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268 +class ComposerAutoloaderInit5ca5cf93238327764a56963c242c2c00 { private static $loader; @@ -22,17 +22,17 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit5ca5cf93238327764a56963c242c2c00', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit2a6c2d46859027bd63fed619863b9268', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit5ca5cf93238327764a56963c242c2c00', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit2a6c2d46859027bd63fed619863b9268::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit5ca5cf93238327764a56963c242c2c00::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit5ca5cf93238327764a56963c242c2c00::$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 9026b1292b6f..8ecfc4cd2309 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit2a6c2d46859027bd63fed619863b9268 +class ComposerStaticInit5ca5cf93238327764a56963c242c2c00 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3022,9 +3022,9 @@ class ComposerStaticInit2a6c2d46859027bd63fed619863b9268 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit2a6c2d46859027bd63fed619863b9268::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit5ca5cf93238327764a56963c242c2c00::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit5ca5cf93238327764a56963c242c2c00::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit5ca5cf93238327764a56963c242c2c00::$classMap; }, null, ClassLoader::class); }