Skip to content

Commit a5f24e8

Browse files
committed
Updated Rector to commit b49ed2949d0ad01e83e6145eea86d89b7a451661
rectorphp/rector-src@b49ed29 [AutoImport] Handle FQCN in/not in use on auto import + remove unused import as prefix = suffix (#7957)
1 parent 8617a25 commit a5f24e8

6 files changed

Lines changed: 21 additions & 19 deletions

File tree

rules/TypeDeclaration/PHPStan/ObjectTypeSpecifier.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@ public function narrowToFullyQualifiedOrAliasedObjectType(Node $node, ObjectType
5757
return new FullyQualifiedObjectType($className);
5858
}
5959
$uses = $this->useImportsResolver->resolve();
60-
$aliasedObjectType = $this->matchAliasedObjectType($objectType, $uses);
61-
if ($aliasedObjectType instanceof AliasedObjectType) {
62-
return $aliasedObjectType;
63-
}
64-
$shortenedObjectType = $this->matchShortenedObjectType($objectType, $uses);
65-
if ($shortenedObjectType !== null) {
66-
return $shortenedObjectType;
60+
if (!$withPreslash) {
61+
$aliasedObjectType = $this->matchAliasedObjectType($objectType, $uses);
62+
if ($aliasedObjectType instanceof AliasedObjectType) {
63+
return $aliasedObjectType;
64+
}
65+
$shortenedObjectType = $this->matchShortenedObjectType($objectType, $uses);
66+
if ($shortenedObjectType !== null) {
67+
return $shortenedObjectType;
68+
}
6769
}
6870
if ($this->reflectionProvider->hasClass($className)) {
6971
return new FullyQualifiedObjectType($className);

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'c2251bd23ba10273cf12272894f8f254c07a6be2';
22+
public const PACKAGE_VERSION = 'b49ed2949d0ad01e83e6145eea86d89b7a451661';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-04-05 17:39:42';
27+
public const RELEASE_DATE = '2026-04-05 20:48:17';
2828
/**
2929
* @var int
3030
*/

vendor/composer/installed.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,24 +1759,24 @@
17591759
"source": {
17601760
"type": "git",
17611761
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
1762-
"reference": "77ccf646e697589619b4dda07865b1d638b64b83"
1762+
"reference": "549a1e316e5e123c13edf4d6e825c6fcb9224f57"
17631763
},
17641764
"dist": {
17651765
"type": "zip",
1766-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/77ccf646e697589619b4dda07865b1d638b64b83",
1767-
"reference": "77ccf646e697589619b4dda07865b1d638b64b83",
1766+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/549a1e316e5e123c13edf4d6e825c6fcb9224f57",
1767+
"reference": "549a1e316e5e123c13edf4d6e825c6fcb9224f57",
17681768
"shasum": ""
17691769
},
17701770
"require": {
17711771
"php": ">=8.3"
17721772
},
17731773
"require-dev": {
17741774
"phpstan\/extension-installer": "^1.4",
1775-
"phpstan\/phpstan": "2.1.x-dev",
1775+
"phpstan\/phpstan": "^2.1.33",
17761776
"phpstan\/phpstan-webmozart-assert": "^2.0",
17771777
"phpunit\/phpunit": "^11.5",
17781778
"rector\/jack": "^0.5.1",
1779-
"rector\/rector-src": "dev-test-21xdev",
1779+
"rector\/rector-src": "dev-main",
17801780
"rector\/swiss-knife": "^2.3",
17811781
"rector\/type-perfect": "^2.1",
17821782
"symplify\/easy-coding-standard": "^13.0",
@@ -1788,7 +1788,7 @@
17881788
"tomasvotruba\/unused-public": "^2.2",
17891789
"tracy\/tracy": "^2.11"
17901790
},
1791-
"time": "2026-04-05T10:35:15+00:00",
1791+
"time": "2026-04-05T10:59:16+00:00",
17921792
"default-branch": true,
17931793
"type": "rector-extension",
17941794
"extra": {

vendor/composer/installed.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

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 fb71542'), '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 77ccf64'), '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 389eeab'), '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 cf3936e'));
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 fb71542'), '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 549a1e3'), '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 389eeab'), '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 cf3936e'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-downgrade-php/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"require-dev": {
1010
"phpstan\/extension-installer": "^1.4",
11-
"phpstan\/phpstan": "2.1.x-dev",
11+
"phpstan\/phpstan": "^2.1.33",
1212
"phpstan\/phpstan-webmozart-assert": "^2.0",
1313
"phpunit\/phpunit": "^11.5",
1414
"rector\/jack": "^0.5.1",
15-
"rector\/rector-src": "dev-test-21xdev",
15+
"rector\/rector-src": "dev-main",
1616
"rector\/swiss-knife": "^2.3",
1717
"rector\/type-perfect": "^2.1",
1818
"symplify\/easy-coding-standard": "^13.0",

0 commit comments

Comments
 (0)