-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#7817Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | v2.3.0 |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/57996b15-af81-4b8b-afc1-01690fe4ba79
<?php
final class LivestreamTopicItemsCleaner extends AbstractVideoItemCleaner
{
public function __construct(private readonly EntityManagerInterface $em, LoggerInterface $logger)
{
parent::__construct($em, $logger);
}
protected function foobar(): array
{
$this->em->clear(); // demonstrate usage
}
}
abstract class AbstractVideoItemCleaner
{
public function __construct(
private readonly EntityManagerInterface $em,
private readonly LoggerInterface $logger,
) {
}
}Responsible rules
RemoveParentDelegatingConstructorRector
Expected Behavior
While I appreciate this change as it raised my attention on this is weirdly defined class (my abstract/base class may defined $em protected instead), I expected no code change at all here.