From bf8ee682884234ee8d9dbdd059c76a15e8fbe07b Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 20 Feb 2024 19:00:33 +0000 Subject: [PATCH] Updated Rector to commit 29562ce48e265fbd75bf13df5e6662af76a44846 https://github.com/rectorphp/rector-src/commit/29562ce48e265fbd75bf13df5e6662af76a44846 [VendorLocker] Early return false on private method on ParentClassMethodTypeOverrideGuard::hasParentClassMethod() (#5644) --- src/Application/VersionResolver.php | 4 ++-- src/VendorLocker/ParentClassMethodTypeOverrideGuard.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index f677d9e158a..6a270518170 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 = '381ecb376283095a82809fd319eae0cfd237165a'; + public const PACKAGE_VERSION = '29562ce48e265fbd75bf13df5e6662af76a44846'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-02-20 16:21:56'; + public const RELEASE_DATE = '2024-02-21 01:58:22'; /** * @var int */ diff --git a/src/VendorLocker/ParentClassMethodTypeOverrideGuard.php b/src/VendorLocker/ParentClassMethodTypeOverrideGuard.php index bd661ee4a51..376b93fc2b2 100644 --- a/src/VendorLocker/ParentClassMethodTypeOverrideGuard.php +++ b/src/VendorLocker/ParentClassMethodTypeOverrideGuard.php @@ -53,6 +53,10 @@ final class ParentClassMethodTypeOverrideGuard */ public function hasParentClassMethod($classMethod) : bool { + // early got false on private method + if ($classMethod->isPrivate()) { + return \false; + } try { $parentClassMethod = $this->resolveParentClassMethod($classMethod); return $parentClassMethod instanceof MethodReflection;