Skip to content

Commit f338e5f

Browse files
committed
Updated Rector to commit 7f5d49d6f6c4141066a02080f2adbb96184e07e4
rectorphp/rector-src@7f5d49d [Php80] Handle OpenApi\Attributes\Property example to keep numeric string on AnnotationToAttributeRector (#7677)
1 parent 7828338 commit f338e5f

File tree

18 files changed

+193
-48
lines changed

18 files changed

+193
-48
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 = '6535bab5b232c176615758999fc80d6c26227092';
22+
public const PACKAGE_VERSION = '7f5d49d6f6c4141066a02080f2adbb96184e07e4';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-11-27 14:31:27';
27+
public const RELEASE_DATE = '2025-11-28 10:04:44';
2828
/**
2929
* @var int
3030
*/

src/PhpAttribute/AttributeArrayNameInliner.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@
1313
use RectorPrefix202511\Webmozart\Assert\Assert;
1414
final class AttributeArrayNameInliner
1515
{
16+
/**
17+
* @var class-string
18+
*/
19+
private const OPEN_API_PROPERTY_ATTRIBUTE = 'OpenApi\Attributes\Property';
1620
/**
1721
* @param Array_|list<Arg> $array
1822
* @return list<Arg>
1923
*/
20-
public function inlineArrayToArgs($array): array
24+
public function inlineArrayToArgs($array, ?string $attributeClass = null): array
2125
{
2226
if (is_array($array)) {
23-
return $this->inlineArray($array);
27+
return $this->inlineArray($array, $attributeClass);
2428
}
2529
return $this->inlineArrayNode($array);
2630
}
@@ -48,10 +52,13 @@ private function inlineArrayNode(Array_ $array): array
4852
* @param list<Arg> $args
4953
* @return list<Arg>
5054
*/
51-
private function inlineArray(array $args): array
55+
private function inlineArray(array $args, ?string $attributeClass = null): array
5256
{
5357
Assert::allIsAOf($args, Arg::class);
5458
foreach ($args as $arg) {
59+
if ($attributeClass === self::OPEN_API_PROPERTY_ATTRIBUTE && $arg->name instanceof Identifier && $arg->name->toString() === 'example') {
60+
continue;
61+
}
5562
if ($arg->value instanceof String_ && is_numeric($arg->value->value)) {
5663
// use equal over identical on purpose to verify if it is an integer
5764
if ((float) $arg->value->value == (int) $arg->value->value) {

src/PhpAttribute/NodeFactory/PhpAttributeGroupFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function create(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValu
8989
$values = $doctrineAnnotationTagValueNode->getValuesWithSilentKey();
9090
$args = $this->createArgsFromItems($values, '', $annotationToAttribute->getClassReferenceFields());
9191
$this->annotationToAttributeIntegerValueCaster->castAttributeTypes($annotationToAttribute, $args);
92-
$args = $this->attributeArrayNameInliner->inlineArrayToArgs($args);
92+
$args = $this->attributeArrayNameInliner->inlineArrayToArgs($args, $annotationToAttribute->getAttributeClass());
9393
$attributeName = $this->attributeNameFactory->create($annotationToAttribute, $doctrineAnnotationTagValueNode, $uses);
9494
// keep FQN in the attribute, so it can be easily detected later
9595
$attributeName->setAttribute(AttributeKey::PHP_ATTRIBUTE_NAME, $annotationToAttribute->getAttributeClass());

vendor/composer/autoload_files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
$baseDir = dirname($vendorDir);
77

88
return array(
9-
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
109
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
10+
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
1111
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
1212
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
1313
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',

vendor/composer/autoload_static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
class ComposerStaticInita7e267cdc27b27e669e2bfb1953e23ac
88
{
99
public static $files = array (
10-
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
1110
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
11+
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
1212
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
1313
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
1414
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',

vendor/composer/installed.json

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,37 +2815,38 @@
28152815
},
28162816
{
28172817
"name": "symfony\/string",
2818-
"version": "v7.3.4",
2819-
"version_normalized": "7.3.4.0",
2818+
"version": "v7.4.0",
2819+
"version_normalized": "7.4.0.0",
28202820
"source": {
28212821
"type": "git",
28222822
"url": "https:\/\/github.com\/symfony\/string.git",
2823-
"reference": "f96476035142921000338bad71e5247fbc138872"
2823+
"reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003"
28242824
},
28252825
"dist": {
28262826
"type": "zip",
2827-
"url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/f96476035142921000338bad71e5247fbc138872",
2828-
"reference": "f96476035142921000338bad71e5247fbc138872",
2827+
"url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/d50e862cb0a0e0886f73ca1f31b865efbb795003",
2828+
"reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003",
28292829
"shasum": ""
28302830
},
28312831
"require": {
28322832
"php": ">=8.2",
2833+
"symfony\/deprecation-contracts": "^2.5|^3.0",
28332834
"symfony\/polyfill-ctype": "~1.8",
2834-
"symfony\/polyfill-intl-grapheme": "~1.0",
2835+
"symfony\/polyfill-intl-grapheme": "~1.33",
28352836
"symfony\/polyfill-intl-normalizer": "~1.0",
28362837
"symfony\/polyfill-mbstring": "~1.0"
28372838
},
28382839
"conflict": {
28392840
"symfony\/translation-contracts": "<2.5"
28402841
},
28412842
"require-dev": {
2842-
"symfony\/emoji": "^7.1",
2843-
"symfony\/http-client": "^6.4|^7.0",
2844-
"symfony\/intl": "^6.4|^7.0",
2843+
"symfony\/emoji": "^7.1|^8.0",
2844+
"symfony\/http-client": "^6.4|^7.0|^8.0",
2845+
"symfony\/intl": "^6.4|^7.0|^8.0",
28452846
"symfony\/translation-contracts": "^2.5|^3.0",
2846-
"symfony\/var-exporter": "^6.4|^7.0"
2847+
"symfony\/var-exporter": "^6.4|^7.0|^8.0"
28472848
},
2848-
"time": "2025-09-11T14:36:48+00:00",
2849+
"time": "2025-11-27T13:27:24+00:00",
28492850
"type": "library",
28502851
"installation-source": "dist",
28512852
"autoload": {
@@ -2884,7 +2885,7 @@
28842885
"utf8"
28852886
],
28862887
"support": {
2887-
"source": "https:\/\/github.com\/symfony\/string\/tree\/v7.3.4"
2888+
"source": "https:\/\/github.com\/symfony\/string\/tree\/v7.4.0"
28882889
},
28892890
"funding": [
28902891
{
@@ -2908,31 +2909,31 @@
29082909
},
29092910
{
29102911
"name": "symfony\/yaml",
2911-
"version": "v7.3.5",
2912-
"version_normalized": "7.3.5.0",
2912+
"version": "v7.4.0",
2913+
"version_normalized": "7.4.0.0",
29132914
"source": {
29142915
"type": "git",
29152916
"url": "https:\/\/github.com\/symfony\/yaml.git",
2916-
"reference": "90208e2fc6f68f613eae7ca25a2458a931b1bacc"
2917+
"reference": "6c84a4b55aee4cd02034d1c528e83f69ddf63810"
29172918
},
29182919
"dist": {
29192920
"type": "zip",
2920-
"url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/90208e2fc6f68f613eae7ca25a2458a931b1bacc",
2921-
"reference": "90208e2fc6f68f613eae7ca25a2458a931b1bacc",
2921+
"url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/6c84a4b55aee4cd02034d1c528e83f69ddf63810",
2922+
"reference": "6c84a4b55aee4cd02034d1c528e83f69ddf63810",
29222923
"shasum": ""
29232924
},
29242925
"require": {
29252926
"php": ">=8.2",
2926-
"symfony\/deprecation-contracts": "^2.5|^3.0",
2927+
"symfony\/deprecation-contracts": "^2.5|^3",
29272928
"symfony\/polyfill-ctype": "^1.8"
29282929
},
29292930
"conflict": {
29302931
"symfony\/console": "<6.4"
29312932
},
29322933
"require-dev": {
2933-
"symfony\/console": "^6.4|^7.0"
2934+
"symfony\/console": "^6.4|^7.0|^8.0"
29342935
},
2935-
"time": "2025-09-27T09:00:46+00:00",
2936+
"time": "2025-11-16T10:14:42+00:00",
29362937
"bin": [
29372938
"Resources\/bin\/yaml-lint"
29382939
],
@@ -2963,7 +2964,7 @@
29632964
"description": "Loads and dumps YAML files",
29642965
"homepage": "https:\/\/symfony.com",
29652966
"support": {
2966-
"source": "https:\/\/github.com\/symfony\/yaml\/tree\/v7.3.5"
2967+
"source": "https:\/\/github.com\/symfony\/yaml\/tree\/v7.4.0"
29672968
},
29682969
"funding": [
29692970
{

0 commit comments

Comments
 (0)