mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 00:40:52 +00:00
Updated Rector to commit eea59bf3b2d52aa7553cfa3d36ea0de69221abe5
eea59bf3b2
Fix "method x was not found in reflection of class" (#5871)
This commit is contained in:
parent
49d837e2a6
commit
b5b172a4b9
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'e2a184cb16dfe1964feecbe44f7d7cc6130ac010';
|
||||
public const PACKAGE_VERSION = 'eea59bf3b2d52aa7553cfa3d36ea0de69221abe5';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-05-12 22:52:35';
|
||||
public const RELEASE_DATE = '2024-05-13 14:20:35';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
@ -103,10 +103,10 @@ final class ClassMethodReturnTypeOverrideGuard
|
|||
{
|
||||
$methodName = $classMethod->name->toString();
|
||||
foreach ($childrenClassReflections as $childClassReflection) {
|
||||
$methodReflection = $childClassReflection->getNativeMethod($methodName);
|
||||
if (!$methodReflection instanceof PhpMethodReflection) {
|
||||
if (!$childClassReflection->hasNativeMethod($methodName)) {
|
||||
continue;
|
||||
}
|
||||
$methodReflection = $childClassReflection->getNativeMethod($methodName);
|
||||
$parametersAcceptor = ParametersAcceptorSelector::combineAcceptors($methodReflection->getVariants());
|
||||
$childReturnType = $parametersAcceptor->getNativeReturnType();
|
||||
if (!$returnType->isSuperTypeOf($childReturnType)->yes()) {
|
||||
|
|
|
@ -49,6 +49,9 @@ final class ClassMethodReturnVendorLockResolver
|
|||
if (!$nativeClassReflection->hasMethod($methodName)) {
|
||||
continue;
|
||||
}
|
||||
if (!$ancestorClassReflections->hasNativeMethod($methodName)) {
|
||||
continue;
|
||||
}
|
||||
$parentClassMethodReflection = $ancestorClassReflections->getNativeMethod($methodName);
|
||||
$parametersAcceptor = $parentClassMethodReflection->getVariants()[0];
|
||||
if (!$parametersAcceptor instanceof FunctionVariantWithPhpDocs) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user