-
-
Notifications
You must be signed in to change notification settings - Fork 137
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return value from CommandController commands not outputted #658
Comments
Hm, I didn't even know this is possible ;) Would you agree on fixing, but deprecating this and include it in a bugfix version? As this is what I would have done for 5.0.0 if I would have know about it. |
It should be fixed for 5.x but I wouldn't go as far as deprecating it since that should be done in TYPO3 core first then. |
Not sure why. I deprecated things like using options as arguments and vice versa in console, although the TYPO3 does not deprecate it. This is similar. How do you think it is beneficial to convert a returned string to output? It is just a different way of doing things. return 'Here is my final output'; vs. $this->outputLine('Here is my final output'); I don't see how implicit is any better than explicit. |
It's not really limited to CLI, the same works for web requests and always has in Extbase which would lead to an inconsistency:
We should keep this in mind too. |
Imho one of the major flaws in the CommandController concept is exactly that it tries to mimik With the integration of symfony/console into command controllers (long time ago and also in Flow) the previously existing view logic was basically made obsolete, as symfony just directly prints out everything directly. So yes, command controllers are different, because the domain is different. Trying to apply concepts from web requests to the command line does not help. And: you can change your command controllers to use |
Sure thing (and I'll fix my command), just wanted to make sure we don't forget anything here. Personally I'm fine to use the (superior) output API. |
The return value of any Extbase
CommandController
command is not outputted anymore.Given the following command:
When I run this command:
I get no output.
And I expected this output:
The text was updated successfully, but these errors were encountered: