-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Command controller tweaks to #5062 #5299
Conversation
|
||
return $content; | ||
return new Response($content); |
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.
missing use statement for response
2457940
to
59f8c95
Compare
This PR was merged into the 2.3 branch. Discussion ---------- Command controller tweaks to #5062 | Q | A | ------------- | --- | Doc fix? | yes #5062 | New docs? | no | Applies to | 2.3+ | Fixed tickets | #5062 Hi guys! This is a proofread and bug fix after merging #5062. Notably, I changed to use the `BufferedOutput` and returned a Response from the controller instead of the string. Please let me know if you see any errors - I was coding this right inside the docs 😇. Thanks! Commits ------- aad7277 Fixing things thanks to Wouter 59f8c95 Tweaks to the new using commands in a controller article
👍 Never heard of the |
@@ -30,7 +30,8 @@ allows you to directly execute a registered command inside your controller:: | |||
use Symfony\Bundle\FrameworkBundle\Console\Application; | |||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |||
use Symfony\Component\Console\Input\ArrayInput; | |||
use Symfony\Component\Console\Output\StreamOutput; | |||
use Symfony\Component\Console\Output\BufferedOutput; |
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.
this is wrong. BufferedOutput does not exist in 2.3. It is a 2.4+ feature
… (xabbuh) This PR was merged into the 2.3 branch. Discussion ---------- [Cookbook][Console] don't use BufferedOutput on Symfony 2.3 | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #5299 (comment) As @stof pointed out in #5299 (comment), the `StreamOutput` class is not available on Symfony 2.3. This should be reverted after merging it up to the `2.6` branch. Commits ------- 4e9e0dd don't use BufferedOutput on Symfony 2.3
Hi guys!
This is a proofread and bug fix after merging #5062. Notably, I changed to use the
BufferedOutput
and returned a Response from the controller instead of the string.Please let me know if you see any errors - I was coding this right inside the docs 😇.
Thanks!