-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Description
Feature request
Some classes may have an optional constructor, but the strict rules requires the parent constructor to be called (RequireParentConstructCallRule)
We want to make it easy to extend the Symfony\Componant\Console\Command
class, having dependencies injected in the constructor, without requiring a call to the parent constructor. We need to keep the Command::__constructor
method for backward compatibility for setting the $name
property (see symfony/symfony#59564)
Example: https://phpstan.org/r/9c33c972-d1c6-4608-80b7-990cbbfcc0f8
Ideally, a phpdoc annotation on Command::__constructor
method would indicate that calling the constructor in child classes is optional.
Did PHPStan help you today? Did it make you happy in any way?
No response
Metadata
Metadata
Assignees
Labels
No labels