Zend\Mvc\Application::run returns ResponseInterface.#4831
Conversation
|
Agree but due a potential BC Break I suggest apply it in the next major version |
|
e2d8c14 and 643a99e where BC breaks, this restores the error somewhat. At the moment the return value of The documentation should be updated too, whatever fix we do because this is simply not true no matter how we choose to fix it: <?php
$application = $serviceManager->get('Application');
$application->bootstrap();
$response = $application->run();
$response->send();Because a response doesn't have a send method, and the application does not return a response. And depending the routes / application environment this could be a fatal error. Either we choose to always return Application or ResponseInterface. I can of course send this PR to develop if you wish. If you tell me your wishes, I can make the changes. |
|
It's a documentation issue at this point. We modified how |
|
Note that it still returns a resonseinterface in some cases. |
|
@reenl I'll correct hose; they're legacy at best, and the method should be consistent. |
This fixes a bug where the run function returns a \Zend\Mvc\Application in a lot of cases. According to the phpdoc and the documentation it should return a Zend\Stdlib\ResponseInterface.