Skip to content

Commit adf15bb

Browse files
committed
Updated Rector to commit 61016bf5307b804df5babb81db27cacbccb12efa
rectorphp/rector-src@61016bf [CodeQuality] Use existing PhpAttributeAnalyzer service instead of AttributeFinder from Doctrine package on DynamicDocBlockPropertyToNativePropertyRector (#6382)
1 parent 1a957f8 commit adf15bb

File tree

9 files changed

+62
-27
lines changed

9 files changed

+62
-27
lines changed

vendor/composer/autoload_classmap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@
460460
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\DB' => $vendorDir . '/illuminate/container/Attributes/DB.php',
461461
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Database' => $vendorDir . '/illuminate/container/Attributes/Database.php',
462462
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Log' => $vendorDir . '/illuminate/container/Attributes/Log.php',
463+
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\RouteParameter' => $vendorDir . '/illuminate/container/Attributes/RouteParameter.php',
463464
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Storage' => $vendorDir . '/illuminate/container/Attributes/Storage.php',
464465
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Tag' => $vendorDir . '/illuminate/container/Attributes/Tag.php',
465466
'RectorPrefix202410\\Illuminate\\Container\\BoundMethod' => $vendorDir . '/illuminate/container/BoundMethod.php',

vendor/composer/autoload_static.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ class ComposerStaticInit4d4c37b878ce01a3ff505ba7def6aac7
679679
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\DB' => __DIR__ . '/..' . '/illuminate/container/Attributes/DB.php',
680680
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Database' => __DIR__ . '/..' . '/illuminate/container/Attributes/Database.php',
681681
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Log' => __DIR__ . '/..' . '/illuminate/container/Attributes/Log.php',
682+
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\RouteParameter' => __DIR__ . '/..' . '/illuminate/container/Attributes/RouteParameter.php',
682683
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Storage' => __DIR__ . '/..' . '/illuminate/container/Attributes/Storage.php',
683684
'RectorPrefix202410\\Illuminate\\Container\\Attributes\\Tag' => __DIR__ . '/..' . '/illuminate/container/Attributes/Tag.php',
684685
'RectorPrefix202410\\Illuminate\\Container\\BoundMethod' => __DIR__ . '/..' . '/illuminate/container/BoundMethod.php',

vendor/composer/installed.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -512,17 +512,17 @@
512512
},
513513
{
514514
"name": "illuminate\/container",
515-
"version": "v11.27.2",
516-
"version_normalized": "11.27.2.0",
515+
"version": "v11.28.0",
516+
"version_normalized": "11.28.0.0",
517517
"source": {
518518
"type": "git",
519519
"url": "https:\/\/github.com\/illuminate\/container.git",
520-
"reference": "bc49d144a20b0d432e1ac812c9e056594b6c6480"
520+
"reference": "06dfc614aff58384b28ba5ad191f6a02d6b192cb"
521521
},
522522
"dist": {
523523
"type": "zip",
524-
"url": "https:\/\/api.github.com\/repos\/illuminate\/container\/zipball\/bc49d144a20b0d432e1ac812c9e056594b6c6480",
525-
"reference": "bc49d144a20b0d432e1ac812c9e056594b6c6480",
524+
"url": "https:\/\/api.github.com\/repos\/illuminate\/container\/zipball\/06dfc614aff58384b28ba5ad191f6a02d6b192cb",
525+
"reference": "06dfc614aff58384b28ba5ad191f6a02d6b192cb",
526526
"shasum": ""
527527
},
528528
"require": {
@@ -533,7 +533,7 @@
533533
"provide": {
534534
"psr\/container-implementation": "1.1|2.0"
535535
},
536-
"time": "2024-10-08T13:34:53+00:00",
536+
"time": "2024-10-11T15:30:11+00:00",
537537
"type": "library",
538538
"extra": {
539539
"branch-alias": {
@@ -569,8 +569,8 @@
569569
},
570570
{
571571
"name": "illuminate\/contracts",
572-
"version": "v11.27.2",
573-
"version_normalized": "11.27.2.0",
572+
"version": "v11.28.0",
573+
"version_normalized": "11.28.0.0",
574574
"source": {
575575
"type": "git",
576576
"url": "https:\/\/github.com\/illuminate\/contracts.git",
@@ -867,17 +867,17 @@
867867
},
868868
{
869869
"name": "phpstan\/phpdoc-parser",
870-
"version": "1.32.0",
871-
"version_normalized": "1.32.0.0",
870+
"version": "1.33.0",
871+
"version_normalized": "1.33.0.0",
872872
"source": {
873873
"type": "git",
874874
"url": "https:\/\/github.com\/phpstan\/phpdoc-parser.git",
875-
"reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4"
875+
"reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140"
876876
},
877877
"dist": {
878878
"type": "zip",
879-
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/6ca22b154efdd9e3c68c56f5d94670920a1c19a4",
880-
"reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4",
879+
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/82a311fd3690fb2bf7b64d5c98f912b3dd746140",
880+
"reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140",
881881
"shasum": ""
882882
},
883883
"require": {
@@ -894,7 +894,7 @@
894894
"phpunit\/phpunit": "^9.5",
895895
"symfony\/process": "^5.2"
896896
},
897-
"time": "2024-09-26T07:23:32+00:00",
897+
"time": "2024-10-13T11:25:22+00:00",
898898
"type": "library",
899899
"installation-source": "dist",
900900
"autoload": {
@@ -911,7 +911,7 @@
911911
"description": "PHPDoc parser with support for nullable, intersection and generic types",
912912
"support": {
913913
"issues": "https:\/\/github.com\/phpstan\/phpdoc-parser\/issues",
914-
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.32.0"
914+
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.33.0"
915915
},
916916
"install-path": "..\/phpstan\/phpdoc-parser"
917917
},
@@ -1811,12 +1811,12 @@
18111811
"source": {
18121812
"type": "git",
18131813
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
1814-
"reference": "08f5f635bfcc10cb29c74dc0645fc7730b9168e2"
1814+
"reference": "8fabbb085727ea83aa9eecb6c5da9b7209499eef"
18151815
},
18161816
"dist": {
18171817
"type": "zip",
1818-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/08f5f635bfcc10cb29c74dc0645fc7730b9168e2",
1819-
"reference": "08f5f635bfcc10cb29c74dc0645fc7730b9168e2",
1818+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/8fabbb085727ea83aa9eecb6c5da9b7209499eef",
1819+
"reference": "8fabbb085727ea83aa9eecb6c5da9b7209499eef",
18201820
"shasum": ""
18211821
},
18221822
"require": {
@@ -1840,7 +1840,7 @@
18401840
"tomasvotruba\/class-leak": "^0.2",
18411841
"tracy\/tracy": "^2.10"
18421842
},
1843-
"time": "2024-10-09T14:04:40+00:00",
1843+
"time": "2024-10-15T14:34:50+00:00",
18441844
"default-branch": true,
18451845
"type": "rector-extension",
18461846
"extra": {

vendor/composer/installed.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace RectorPrefix202410\Illuminate\Container\Attributes;
4+
5+
use Attribute;
6+
use RectorPrefix202410\Illuminate\Contracts\Container\Container;
7+
use RectorPrefix202410\Illuminate\Contracts\Container\ContextualAttribute;
8+
#[Attribute(Attribute::TARGET_PARAMETER)]
9+
class RouteParameter implements ContextualAttribute
10+
{
11+
/**
12+
* @var string
13+
*/
14+
public $parameter;
15+
/**
16+
* Create a new class instance.
17+
*/
18+
public function __construct(string $parameter)
19+
{
20+
$this->parameter = $parameter;
21+
}
22+
/**
23+
* Resolve the route parameter.
24+
*
25+
* @param self $attribute
26+
* @param \Illuminate\Contracts\Container\Container $container
27+
* @return mixed
28+
*/
29+
public static function resolve(self $attribute, Container $container)
30+
{
31+
return $container->make('request')->route($attribute->parameter);
32+
}
33+
}

vendor/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeNode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class ArrayShapeNode implements \PHPStan\PhpDocParser\Ast\Type\TypeNode
99
{
1010
public const KIND_ARRAY = 'array';
1111
public const KIND_LIST = 'list';
12+
public const KIND_NON_EMPTY_ARRAY = 'non-empty-array';
13+
public const KIND_NON_EMPTY_LIST = 'non-empty-list';
1214
use NodeAttributes;
1315
/** @var ArrayShapeItemNode[] */
1416
public $items;

vendor/phpstan/phpdoc-parser/src/Parser/TypeParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private function parseAtomic(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens)
141141
$type = $this->tryParseCallable($tokens, $type, \false);
142142
} elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
143143
$type = $this->tryParseArrayOrOffsetAccess($tokens, $type);
144-
} elseif (in_array($type->name, ['array', 'list', 'object'], \true) && $tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET) && !$tokens->isPrecededByHorizontalWhitespace()) {
144+
} elseif (in_array($type->name, [Ast\Type\ArrayShapeNode::KIND_ARRAY, Ast\Type\ArrayShapeNode::KIND_LIST, Ast\Type\ArrayShapeNode::KIND_NON_EMPTY_ARRAY, Ast\Type\ArrayShapeNode::KIND_NON_EMPTY_LIST, 'object'], \true) && $tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET) && !$tokens->isPrecededByHorizontalWhitespace()) {
145145
if ($type->name === 'object') {
146146
$type = $this->parseObjectShape($tokens);
147147
} else {
@@ -474,7 +474,7 @@ private function parseCallableReturnType(\PHPStan\PhpDocParser\Parser\TokenItera
474474
}
475475
} elseif ($tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_SQUARE_BRACKET)) {
476476
$type = $this->tryParseArrayOrOffsetAccess($tokens, $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex));
477-
} elseif (in_array($type->name, ['array', 'list', 'object'], \true) && $tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET) && !$tokens->isPrecededByHorizontalWhitespace()) {
477+
} elseif (in_array($type->name, [Ast\Type\ArrayShapeNode::KIND_ARRAY, Ast\Type\ArrayShapeNode::KIND_LIST, Ast\Type\ArrayShapeNode::KIND_NON_EMPTY_ARRAY, Ast\Type\ArrayShapeNode::KIND_NON_EMPTY_LIST, 'object'], \true) && $tokens->isCurrentTokenType(Lexer::TOKEN_OPEN_CURLY_BRACKET) && !$tokens->isPrecededByHorizontalWhitespace()) {
478478
if ($type->name === 'object') {
479479
$type = $this->parseObjectShape($tokens);
480480
} else {

vendor/rector/extension-installer/src/GeneratedConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
final class GeneratedConfig
1111
{
12-
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main e75008c'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main d9cef57'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 08f5f63'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 928f117'));
12+
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main e75008c'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main d9cef57'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 8fabbb0'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 928f117'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-phpunit/rules/CodeQuality/Rector/MethodCall/UseSpecificWillMethodRector.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,12 @@ public function refactor(Node $node) : ?Node
8181
if ($node->isFirstClassCallable()) {
8282
return null;
8383
}
84-
$callArgs = $node->getArgs();
85-
$firstArg = $callArgs[0];
84+
$firstArg = $node->getArgs()[0];
8685
// special case for new map
8786
if ($firstArg->value instanceof New_) {
8887
return $this->refactorNew($firstArg->value, $node);
8988
}
90-
if (!$firstArg->value instanceof MethodCall) {
89+
if (!$firstArg->value instanceof MethodCall && !$firstArg->value instanceof StaticCall) {
9190
return null;
9291
}
9392
$nestedMethodCall = $firstArg->value;
@@ -96,7 +95,6 @@ public function refactor(Node $node) : ?Node
9695
continue;
9796
}
9897
$node->name = new Identifier($newParentMethodName);
99-
// move args up
10098
$node->args = $nestedMethodCall->args;
10199
return $node;
102100
}

0 commit comments

Comments
 (0)