Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] Add support for Invokable Commands inCommandTester#60823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
CommandTester andApplicationruudk commentedJun 18, 2025
Sure I could wrap them manually in |
GromNaN commentedJun 18, 2025
I updated the target branch to 7.4, this is a new feature that cannot be merged into 7.3 |
2e104a7 tobeea196Compareruudk commentedJun 18, 2025
Thanks, it seems that the Application was already fixed in 7.4#60394 |
CommandTester andApplicationCommandTester
GromNaN left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That's good, there are a few things to fix to clean up the PR.
Thanks for the new test.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ruudk commentedJun 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@GromNaN Done, also updated the changelog! |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
GromNaN left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The test needs to be modified, and then we're all good!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ruudk commentedJun 19, 2025
@GromNaN Done, I also added another commit with extra tests. |
ruudk commentedJun 19, 2025
yceruto left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks@ruudk for the improvement!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedJun 23, 2025
Thank you@ruudk. |
138109a intosymfony:7.4Uh oh!
There was an error while loading.Please reload this page.
GromNaN commentedJul 9, 2025
I got the question about testing invokable commands in Symfony 7.3. While this feature will be released in Symfony 7.4, here are two solutions:
|
chalasr commentedJul 9, 2025
Third testing option for 7.3: use |
Uh oh!
There was an error while loading.Please reload this page.
I'm trying out the amazing newInvokable Commands introduced in Symfony 7.3 but I noticed that I could use it together with the CommandTester. It was also not possible to manually add these type of commands to the Application.
I'm not sure what the best approach is with this. As I'm changing the signature of the methods this might be considered a breaking change. Or it might not, as I'm widening the type from Command to object.
Please advise what the best approach would be to introduce something like this. Thanks 🙏
/cc@yceruto@chalasr