Skip to content

Incorrect behavior of RemoveParentDelegatingConstructorRector with different default value in constructor #9665

@eldair

Description

@eldair

Bug Report

Subject Details
Rector version last dev-main
Installed as composer dependency

Minimal PHP Code Causing Issue

See https://getrector.com/demo/d5bc7838-3225-4823-95ec-b5a42c11d009

<?php

namespace Domains\Calculator\Exceptions;

use Exception;

class EmailException extends Exception
{
    public function __construct($message = 'Email not sent.', ...$args)
    {
        parent::__construct($message, ...$args);
    }
}

Responsible rules

  • RemoveParentDelegatingConstructorRector

Expected Behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions