Cannot use Zend\Stdlib\ResponseInterface as Response because the name is already in use in Zend\Stdlib\DispatchableInterface #5223

Closed
harpcio opened this Issue Oct 4, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@harpcio

harpcio commented Oct 4, 2013

I found this bug when I was testing my Controller with PHPUnit. Controller use service and the service return SuccessResponse which extends Zend\Stdlib\Response.

Solution:

namespace Zend\Stdlib;

use Zend\Stdlib\RequestInterface;
use Zend\Stdlib\ResponseInterface;

interface DispatchableInterface
{
    /**
     * Dispatch a request
     *
     * @param RequestInterface       $request
     * @param null|ResponseInterface $response
     *
     * @return Response|mixed
     */
    public function dispatch(RequestInterface $request, ResponseInterface $response = null);
}
@Maks3w

This comment has been minimized.

Show comment Hide comment
@Maks3w

Maks3w Oct 4, 2013

Member

Indeed. Could you send a Pull Request with your patch?

PD: There is no need of import that interfaces (uses) since all interfaces are in the same namespace

Member

Maks3w commented Oct 4, 2013

Indeed. Could you send a Pull Request with your patch?

PD: There is no need of import that interfaces (uses) since all interfaces are in the same namespace

ClemensSahs added a commit to ClemensSahs/zf2 that referenced this issue Oct 18, 2013

fix for #5223
Problem with namespace
@weierophinney

This comment has been minimized.

Show comment Hide comment
@weierophinney

weierophinney Oct 30, 2013

Owner

It appears @mwillbanks Merged this on the 19th; closing.

Owner

weierophinney commented Oct 30, 2013

It appears @mwillbanks Merged this on the 19th; closing.

@Maks3w Maks3w referenced this issue Nov 3, 2013

Merged

Fixes for #5356 #5408

gianarb pushed a commit to zendframework/zend-stdlib that referenced this issue May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment