-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#1337Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-master |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.org/demo/1ec4aa74-578d-6c44-b454-a334ad2f1c73
<?php
final class DemoSetting extends AbstractSetting
{
private PageInterface $page;
private SectionInterface $section;
public function __construct(PageInterface $page, SectionInterface $section)
{
$this->page = $page;
$this->section = $section;
parent::__construct($page, $section);
}
public function getPage()
{
return $this->page;
}
}
abstract class AbstractSetting
{
public function __construct(PageInterface $page, SectionInterface $section)
{
// do something with $page and $section
$page->runSomething();
$section->runSomething();
}
}Responsible rules
-
RemoveUnusedPromotedPropertyRector -
RemoveUnusedPrivatePropertyRector
Expected Behavior
Rector should not remove the constructor parameter $section from DemoSetting, since this gets passed to the parent::__construct.