From ae1f64a7a0997abf1f9dbc90e8c06e322aaf57e0 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 5 Mar 2024 11:28:48 +0000 Subject: [PATCH] Updated Rector to commit e29b97e4b5d6dd5a0c5ee442067cb52f7dbb7f25 https://github.com/rectorphp/rector-src/commit/e29b97e4b5d6dd5a0c5ee442067cb52f7dbb7f25 [Php81] Handle with attribute on ReadOnlyPropertyRector on property promotion (#5692) --- rules/Php81/Rector/Property/ReadOnlyPropertyRector.php | 3 +++ src/Application/VersionResolver.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php b/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php index 0489dd1de17..855f2cc6c0c 100644 --- a/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php +++ b/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php @@ -192,6 +192,9 @@ CODE_SAMPLE if ($this->isPromotedPropertyAssigned($class, $param)) { return null; } + if ($param->attrGroups !== []) { + $param->setAttribute(AttributeKey::ORIGINAL_NODE, null); + } $this->visibilityManipulator->makeReadonly($param); return $param; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3fab3b8f467..2e18de56cc4 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '104f656edd312203d24db4cbe60bd54b78c421f8'; + public const PACKAGE_VERSION = 'e29b97e4b5d6dd5a0c5ee442067cb52f7dbb7f25'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-05 08:15:26'; + public const RELEASE_DATE = '2024-03-05 18:26:34'; /** * @var int */