1
0
mirror of https://github.com/rectorphp/rector.git synced 2025-04-25 09:55:28 +02:00

Updated Rector to commit 101bdbfa9bd837daa593ad06f2eee44d259cbcca

101bdbfa9b [Php70] Do not replace if method call if method exists in current class on call same method with parent on Php4ConstructorRector ()
This commit is contained in:
Tomas Votruba 2024-11-28 10:19:50 +00:00
parent c4a5338933
commit 897110e2bf
2 changed files with 3 additions and 3 deletions
rules/Php70/Rector/ClassMethod
src/Application

@ -115,7 +115,7 @@ CODE_SAMPLE
$stmtKey = $psr4ConstructorMethod->getAttribute(AttributeKey::STMT_KEY);
unset($node->stmts[$stmtKey]);
}
if ($this->isLocalMethodCallNamed($classMethodStmt->expr, $parentClassName)) {
if ($this->isLocalMethodCallNamed($classMethodStmt->expr, $parentClassName) && !$node->getMethod($parentClassName) instanceof ClassMethod) {
/** @var MethodCall $expr */
$expr = $classMethodStmt->expr;
$classMethodStmt->expr = new StaticCall(new FullyQualified($parentClassName), new Identifier(MethodName::CONSTRUCT), $expr->args);

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '0635cd9d519b9f8464e59e968bdfdcfde9b656bb';
public const PACKAGE_VERSION = '101bdbfa9bd837daa593ad06f2eee44d259cbcca';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-11-28 08:40:54';
public const RELEASE_DATE = '2024-11-28 17:17:33';
/**
* @var int
*/