Conversation
| $this->addCommand($command); | ||
| } else { | ||
| $this->add($command); | ||
| } |
There was a problem hiding this comment.
I believe this part should be resolved here and should not be a part of this PR.
There was a problem hiding this comment.
For my part, I feel that the current proposal is the right approach. Simply replacing it with addCommand would risk breaking compatibility with Symfony 5.4, 6.x, and 7.x.
Using if (method_exists()) seems appropriate to me to ensure backward compatibility between versions. Alternatively, we could use addCommands([$command]), which is available everywhere, even if it is indeed a little less elegant. What do you think?
There was a problem hiding this comment.
I agree with @roukmoute for his solution to support more symfony versions.
But i think it should be moved to a seperate PR.
There was a problem hiding this comment.
Update: It is already merged in a sperate PR. Looks like addCommand() is supported since 5.4 accoring to test-runs.
|
Hello @stof, would you have a moment to take a look at this PR :) ? |
|
Fixed in #1509 |
Fixes #1504
cc @theofidry