1
0
mirror of https://github.com/rectorphp/rector.git synced 2025-03-21 15:59:46 +01:00

Updated Rector to commit beffd07acd0f131b0bad64461ae901fd9bb4e03c

beffd07acd ReturnTypeFromStrictParamRector: Fix typo in test-fixture ()
This commit is contained in:
Tomas Votruba 2023-08-29 15:55:26 +00:00
parent 4650cf5c21
commit dd35feba0b
14 changed files with 37 additions and 29 deletions

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '7841dc582440c815796e703cf3cf9b3f17f80285';
public const PACKAGE_VERSION = 'beffd07acd0f131b0bad64461ae901fd9bb4e03c';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-29 14:17:37';
public const RELEASE_DATE = '2023-08-29 15:52:13';
/**
* @var int
*/

2
vendor/autoload.php vendored

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

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit924c364c335ca8c735536588150332cd
class ComposerAutoloaderInitb62a0cbbcb9c0f93d93ca95a52b6c524
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit924c364c335ca8c735536588150332cd
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit924c364c335ca8c735536588150332cd', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitb62a0cbbcb9c0f93d93ca95a52b6c524', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit924c364c335ca8c735536588150332cd', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitb62a0cbbcb9c0f93d93ca95a52b6c524', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit924c364c335ca8c735536588150332cd::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitb62a0cbbcb9c0f93d93ca95a52b6c524::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit924c364c335ca8c735536588150332cd::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitb62a0cbbcb9c0f93d93ca95a52b6c524::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit924c364c335ca8c735536588150332cd
class ComposerStaticInitb62a0cbbcb9c0f93d93ca95a52b6c524
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2607,9 +2607,9 @@ class ComposerStaticInit924c364c335ca8c735536588150332cd
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit924c364c335ca8c735536588150332cd::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit924c364c335ca8c735536588150332cd::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit924c364c335ca8c735536588150332cd::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitb62a0cbbcb9c0f93d93ca95a52b6c524::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb62a0cbbcb9c0f93d93ca95a52b6c524::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb62a0cbbcb9c0f93d93ca95a52b6c524::$classMap;
}, null, ClassLoader::class);
}

@ -504,8 +504,8 @@
},
{
"name": "illuminate\/container",
"version": "v10.20.0",
"version_normalized": "10.20.0.0",
"version": "v10.21.0",
"version_normalized": "10.21.0.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/container.git",
@ -561,8 +561,8 @@
},
{
"name": "illuminate\/contracts",
"version": "v10.20.0",
"version_normalized": "10.20.0.0",
"version": "v10.21.0",
"version_normalized": "10.21.0.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/illuminate\/contracts.git",
@ -1744,12 +1744,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
"reference": "60b4ef14c1103d37c6b98ad9f4e64cee86194280"
"reference": "8acae8ea0de8241fd44002958646cfc3556e9209"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/60b4ef14c1103d37c6b98ad9f4e64cee86194280",
"reference": "60b4ef14c1103d37c6b98ad9f4e64cee86194280",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/8acae8ea0de8241fd44002958646cfc3556e9209",
"reference": "8acae8ea0de8241fd44002958646cfc3556e9209",
"shasum": ""
},
"require": {
@ -1774,7 +1774,7 @@
"tomasvotruba\/type-coverage": "^0.2",
"tomasvotruba\/unused-public": "^0.1"
},
"time": "2023-08-29T07:28:19+00:00",
"time": "2023-08-29T15:51:12+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 60b4ef1'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6fbdefd'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e6dd6a0'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 0f327da'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 8acae8e'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6fbdefd'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e6dd6a0'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 0f327da'));
private function __construct()
{
}

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Doctrine\NodeFactory;
use RectorPrefix202308\Doctrine\Common\Collections\ArrayCollection;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\New_;
use PhpParser\Node\Name\FullyQualified;
@ -22,7 +23,7 @@ final class ArrayCollectionAssignFactory
public function createFromPropertyName(string $toManyPropertyName) : Expression
{
$propertyFetch = $this->nodeFactory->createPropertyFetch('this', $toManyPropertyName);
$new = new New_(new FullyQualified('Doctrine\\Common\\Collections\\ArrayCollection'));
$new = new New_(new FullyQualified(ArrayCollection::class));
$assign = new Assign($propertyFetch, $new);
return new Expression($assign);
}

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Doctrine\NodeManipulator;
use RectorPrefix202308\Doctrine\ORM\Mapping\JoinColumn;
use RectorPrefix202308\Nette\Utils\Strings;
use PhpParser\Node\Expr;
use PhpParser\Node\Stmt\Property;
@ -111,7 +112,7 @@ final class ToOneRelationPropertyTypeResolver
}
private function resolveFromDocBlock(PhpDocInfo $phpDocInfo, Property $property, DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) : Type
{
$joinDoctrineAnnotationTagValueNode = $phpDocInfo->findOneByAnnotationClass('Doctrine\\ORM\\Mapping\\JoinColumn');
$joinDoctrineAnnotationTagValueNode = $phpDocInfo->findOneByAnnotationClass(JoinColumn::class);
return $this->processToOneRelation($property, $doctrineAnnotationTagValueNode, $joinDoctrineAnnotationTagValueNode);
}
private function resolveFromObjectType(FullyQualifiedObjectType $fullyQualifiedObjectType, bool $isNullable) : Type

@ -3,6 +3,8 @@
declare (strict_types=1);
namespace Rector\Doctrine\PhpDocParser;
use RectorPrefix202308\Doctrine\ORM\Mapping\Entity;
use RectorPrefix202308\Doctrine\ORM\Mapping\Embeddable;
use PhpParser\Node\Stmt\Class_;
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
final class DoctrineDocBlockResolver
@ -19,6 +21,6 @@ final class DoctrineDocBlockResolver
public function isDoctrineEntityClass(Class_ $class) : bool
{
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($class);
return $phpDocInfo->hasByAnnotationClasses(['Doctrine\\ORM\\Mapping\\Entity', 'Doctrine\\ORM\\Mapping\\Embeddable']);
return $phpDocInfo->hasByAnnotationClasses([Entity::class, Embeddable::class]);
}
}

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Doctrine\TypeAnalyzer;
use RectorPrefix202308\Doctrine\Common\Collections\Collection;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Generic\GenericObjectType;
use PHPStan\Type\IntegerType;
@ -20,6 +21,6 @@ final class CollectionTypeFactory
private function createGenericObjectType(FullyQualifiedObjectType $fullyQualifiedObjectType) : GenericObjectType
{
$genericTypes = [new IntegerType(), $fullyQualifiedObjectType];
return new GenericObjectType('Doctrine\\Common\\Collections\\Collection', $genericTypes);
return new GenericObjectType(Collection::class, $genericTypes);
}
}

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Doctrine\TypeAnalyzer;
use RectorPrefix202308\Doctrine\ORM\Mapping\OneToMany;
use PhpParser\Node;
use PhpParser\Node\Stmt\Property;
use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode;
@ -59,7 +60,7 @@ final class CollectionTypeResolver
public function resolveFromOneToManyProperty(Property $property) : ?FullyQualifiedObjectType
{
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($property);
$doctrineAnnotationTagValueNode = $phpDocInfo->getByAnnotationClass('Doctrine\\ORM\\Mapping\\OneToMany');
$doctrineAnnotationTagValueNode = $phpDocInfo->getByAnnotationClass(OneToMany::class);
if (!$doctrineAnnotationTagValueNode instanceof DoctrineAnnotationTagValueNode) {
return null;
}

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Doctrine\TypeAnalyzer;
use RectorPrefix202308\Doctrine\ORM\Mapping\OneToMany;
use PhpParser\Node\Stmt\Property;
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
@ -20,7 +21,7 @@ final class CollectionVarTagValueNodeResolver
public function resolve(Property $property) : ?VarTagValueNode
{
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($property);
if (!$phpDocInfo->hasByAnnotationClass('Doctrine\\ORM\\Mapping\\OneToMany')) {
if (!$phpDocInfo->hasByAnnotationClass(OneToMany::class)) {
return null;
}
return $phpDocInfo->getVarTagValueNode();

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Doctrine\TypeAnalyzer;
use RectorPrefix202308\Doctrine\Common\Collections\Collection;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeWithClassName;
@ -40,6 +41,6 @@ final class DoctrineCollectionTypeAnalyzer
return \false;
}
$className = $type instanceof ShortenedObjectType ? $type->getFullyQualifiedName() : $type->getClassName();
return $className === 'Doctrine\\Common\\Collections\\Collection';
return $className === Collection::class;
}
}