-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Description
Bug report
When I use a trait with a separate constructor, which uses DI services and I call in the main Class the constructor like this:
use ArchiveTrait {
ArchiveTrait::__construct as private __archiveConstruct;
}
... __constructor(
private readonly EntityManagerInterface $entityManager,
private readonly Repository $repository,
)
$this->__archiveConstruct($this->repository, $this->entityManager);
gives the following result:
Call to method App\Service\AcmeService::__archiveConstruct() on a separate line has no effect.
🪪 method.resultUnused
Which I think is a bug or I'm totally wrong. The constructor has no return value.
Code snippet that reproduces the problem
https://phpstan.org/r/3aaacb1a-7e35-43f0-8087-f702d8aa0ad2
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels