Skip to content

Commit

Permalink
Updated Rector to commit be24410a00da07e1aeb4eba8083d0e06f19868a9
Browse files Browse the repository at this point in the history
rectorphp/rector-src@be24410  [PostRector] Skip remove unused used at @see for Generic tag  (#3562)
  • Loading branch information
TomasVotruba committed Apr 5, 2023
1 parent c2fef6b commit 288d74e
Show file tree
Hide file tree
Showing 17 changed files with 110 additions and 48 deletions.
14 changes: 14 additions & 0 deletions packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\PhpDoc\GenericTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueNode;
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
Expand Down Expand Up @@ -414,6 +415,19 @@ public function getAnnotationClassNames() : array
}
return $resolvedClasses;
}
/**
* @return string[]
*/
public function getGenericTagClassNames() : array
{
/** @var GenericTagValueNode[] $genericTagValueNodes */
$genericTagValueNodes = $this->phpDocNodeByTypeFinder->findByType($this->phpDocNode, GenericTagValueNode::class);
$resolvedClasses = [];
foreach ($genericTagValueNodes as $genericTagValueNode) {
$resolvedClasses[] = $genericTagValueNode->value;
}
return $resolvedClasses;
}
/**
* @return string[]
*/
Expand Down
2 changes: 2 additions & 0 deletions packages/PostRector/Rector/UnusedImportRemovingPostRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ private function findNamesInDocBlocks($namespace) : array
$names = \array_merge($names, $phpDocInfo->getAnnotationClassNames());
$constFetchNodeNames = $phpDocInfo->getConstFetchNodeClassNames();
$names = \array_merge($names, $constFetchNodeNames);
$genericTagClassNames = $phpDocInfo->getGenericTagClassNames();
$names = \array_merge($names, $genericTagClassNames);
});
return $names;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '1da22824edd107108e087d40233769817a2cbe25';
public const PACKAGE_VERSION = 'be24410a00da07e1aeb4eba8083d0e06f19868a9';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-04-04 07:52:59';
public const RELEASE_DATE = '2023-04-05 07:11:07';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit4fd1f544aa8f7722ab02524f353da142::getLoader();
return ComposerAutoloaderInit1372064fed4bfb229fc8833f8bd18c76::getLoader();
1 change: 1 addition & 0 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
'PHPStan\\PhpDocParser\\Ast\\Type\\GenericTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/GenericTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\IdentifierTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/IdentifierTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\IntersectionTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/IntersectionTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\InvalidTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/InvalidTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\NullableTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/NullableTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\OffsetAccessTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/OffsetAccessTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\ThisTypeNode' => $vendorDir . '/phpstan/phpdoc-parser/src/Ast/Type/ThisTypeNode.php',
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit4fd1f544aa8f7722ab02524f353da142
class ComposerAutoloaderInit1372064fed4bfb229fc8833f8bd18c76
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit4fd1f544aa8f7722ab02524f353da142', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit1372064fed4bfb229fc8833f8bd18c76', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit4fd1f544aa8f7722ab02524f353da142', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit1372064fed4bfb229fc8833f8bd18c76', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit4fd1f544aa8f7722ab02524f353da142::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit1372064fed4bfb229fc8833f8bd18c76::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit4fd1f544aa8f7722ab02524f353da142::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit1372064fed4bfb229fc8833f8bd18c76::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
9 changes: 5 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit4fd1f544aa8f7722ab02524f353da142
class ComposerStaticInit1372064fed4bfb229fc8833f8bd18c76
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -306,6 +306,7 @@ class ComposerStaticInit4fd1f544aa8f7722ab02524f353da142
'PHPStan\\PhpDocParser\\Ast\\Type\\GenericTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/GenericTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\IdentifierTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/IdentifierTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\IntersectionTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/IntersectionTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\InvalidTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/InvalidTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\NullableTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/NullableTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\OffsetAccessTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/OffsetAccessTypeNode.php',
'PHPStan\\PhpDocParser\\Ast\\Type\\ThisTypeNode' => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src/Ast/Type/ThisTypeNode.php',
Expand Down Expand Up @@ -3131,9 +3132,9 @@ class ComposerStaticInit4fd1f544aa8f7722ab02524f353da142
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit4fd1f544aa8f7722ab02524f353da142::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit4fd1f544aa8f7722ab02524f353da142::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit4fd1f544aa8f7722ab02524f353da142::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit1372064fed4bfb229fc8833f8bd18c76::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1372064fed4bfb229fc8833f8bd18c76::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1372064fed4bfb229fc8833f8bd18c76::$classMap;

}, null, ClassLoader::class);
}
Expand Down
34 changes: 17 additions & 17 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -821,17 +821,17 @@
},
{
"name": "phpstan\/phpdoc-parser",
"version": "1.16.1",
"version_normalized": "1.16.1.0",
"version": "1.17.1",
"version_normalized": "1.17.1.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpdoc-parser.git",
"reference": "e27e92d939e2e3636f0a1f0afaba59692c0bf571"
"reference": "d3753fcb3abc6f78f5de6f72153d4b9c99c72dee"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/e27e92d939e2e3636f0a1f0afaba59692c0bf571",
"reference": "e27e92d939e2e3636f0a1f0afaba59692c0bf571",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/d3753fcb3abc6f78f5de6f72153d4b9c99c72dee",
"reference": "d3753fcb3abc6f78f5de6f72153d4b9c99c72dee",
"shasum": ""
},
"require": {
Expand All @@ -846,7 +846,7 @@
"phpunit\/phpunit": "^9.5",
"symfony\/process": "^5.2"
},
"time": "2023-02-07T18:11:17+00:00",
"time": "2023-04-04T11:11:22+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand All @@ -863,23 +863,23 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https:\/\/github.com\/phpstan\/phpdoc-parser\/issues",
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.16.1"
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.17.1"
},
"install-path": "..\/phpstan\/phpdoc-parser"
},
{
"name": "phpstan\/phpstan",
"version": "1.10.10",
"version_normalized": "1.10.10.0",
"version": "1.10.11",
"version_normalized": "1.10.11.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
"reference": "f1e22c9b17a879987f8743d81533250a5fff47f9"
"reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/f1e22c9b17a879987f8743d81533250a5fff47f9",
"reference": "f1e22c9b17a879987f8743d81533250a5fff47f9",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/8aa62e6ea8b58ffb650e02940e55a788cbc3fe21",
"reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21",
"shasum": ""
},
"require": {
Expand All @@ -888,7 +888,7 @@
"conflict": {
"phpstan\/phpstan-shim": "*"
},
"time": "2023-04-01T17:06:15+00:00",
"time": "2023-04-04T19:17:42+00:00",
"bin": [
"phpstan",
"phpstan.phar"
Expand Down Expand Up @@ -2056,12 +2056,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "dfeb67c1b2950de2dbc093ed187fb6559a4ddf21"
"reference": "8a1a1637ea4c39ff1fdbcdb3671beddbd5108978"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/dfeb67c1b2950de2dbc093ed187fb6559a4ddf21",
"reference": "dfeb67c1b2950de2dbc093ed187fb6559a4ddf21",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/8a1a1637ea4c39ff1fdbcdb3671beddbd5108978",
"reference": "8a1a1637ea4c39ff1fdbcdb3671beddbd5108978",
"shasum": ""
},
"require": {
Expand Down Expand Up @@ -2090,7 +2090,7 @@
"tomasvotruba\/type-coverage": "^0.0.9",
"tomasvotruba\/unused-public": "^0.0.34"
},
"time": "2023-02-27T21:11:40+00:00",
"time": "2023-04-04T23:27:38+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
Expand Down
Loading

0 comments on commit 288d74e

Please sign in to comment.