Skip to content

Commit 2ca3e22

Browse files
committed
Updated Rector to commit 22a54d9ce193f56f27a7f663d0d74831bb560a31
rectorphp/rector-src@22a54d9 [Php84] Handle with space on message like class name constant on DeprecatedAnnotationToDeprecatedAttributeRector (#7056)
1 parent b97ec3f commit 2ca3e22

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

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 = '417d068e942d23b6b32412adcdbde3afdddd8dc9';
22+
public const PACKAGE_VERSION = '22a54d9ce193f56f27a7f663d0d74831bb560a31';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-07-08 05:52:28';
27+
public const RELEASE_DATE = '2025-07-10 09:53:36';
2828
/**
2929
* @var int
3030
*/

src/PhpAttribute/AnnotationToAttributeMapper/ClassConstFetchAnnotationToAttributeMapper.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use PhpParser\Node\Name;
99
use PhpParser\Node\Scalar\String_;
1010
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
11+
use Rector\Validation\RectorAssert;
12+
use RectorPrefix202507\Webmozart\Assert\InvalidArgumentException;
1113
/**
1214
* @implements AnnotationToAttributeMapperInterface<string>
1315
*/
@@ -41,6 +43,12 @@ public function map($value) : Node
4143
if ($class === '') {
4244
return new String_($value);
4345
}
46+
try {
47+
RectorAssert::className(\ltrim($class, '\\'));
48+
RectorAssert::propertyName($constant);
49+
} catch (InvalidArgumentException $exception) {
50+
return new String_($value);
51+
}
4452
return new ClassConstFetch(new Name($class), $constant);
4553
}
4654
}

vendor/composer/installed.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,12 +1866,12 @@
18661866
"source": {
18671867
"type": "git",
18681868
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
1869-
"reference": "564999eb1cadcb99eac82192f1166c3de3d7fddf"
1869+
"reference": "8978e8eb6ff694b4e6e6f90187e4fb11a03ae56b"
18701870
},
18711871
"dist": {
18721872
"type": "zip",
1873-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/564999eb1cadcb99eac82192f1166c3de3d7fddf",
1874-
"reference": "564999eb1cadcb99eac82192f1166c3de3d7fddf",
1873+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/8978e8eb6ff694b4e6e6f90187e4fb11a03ae56b",
1874+
"reference": "8978e8eb6ff694b4e6e6f90187e4fb11a03ae56b",
18751875
"shasum": ""
18761876
},
18771877
"require": {
@@ -1900,7 +1900,7 @@
19001900
"tomasvotruba\/unused-public": "^2.0",
19011901
"tracy\/tracy": "^2.10"
19021902
},
1903-
"time": "2025-07-07T17:10:08+00:00",
1903+
"time": "2025-07-08T14:45:00+00:00",
19041904
"default-branch": true,
19051905
"type": "rector-extension",
19061906
"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 c883a96'), '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 4b31180'), '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 c0e6983'), '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 564999e'));
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 c883a96'), '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 4b31180'), '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 c0e6983'), '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 8978e8e'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-symfony/rules/Symfony73/Rector/Class_/ConstraintOptionsToNamedArgumentsRector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ public function refactor(Node $node) : ?Node
5858
if (\strncmp($className, 'Symfony\\Component\\Validator\\Constraints\\', \strlen('Symfony\\Component\\Validator\\Constraints\\')) !== 0) {
5959
return null;
6060
}
61-
if (0 === \count($node->args) || !$node->args[0] instanceof Arg || !$node->args[0]->value instanceof Array_) {
61+
if (\count($node->args) === 0 || !$node->args[0] instanceof Arg || !$node->args[0]->value instanceof Array_) {
6262
return null;
6363
}
6464
$argName = $node->args[0]->name;
65-
if (null !== $argName && 'options' !== $argName->name) {
65+
if ($argName !== null && $argName->name !== 'options') {
6666
return null;
6767
}
6868
$array = $node->args[0]->value;
6969
$namedArgs = [];
7070
foreach ($array->items as $item) {
71-
if (!$item instanceof ArrayItem || null === $item->key) {
71+
if (!$item instanceof ArrayItem || $item->key === null) {
7272
continue;
7373
}
7474
$keyValue = $this->valueResolver->getValue($item->key);

0 commit comments

Comments
 (0)