Open wimpog opened 7 years ago
Yes it onlye return a RedirectResponse in case of a GET; https://github.com/thephpleague/omnipay-common/blob/b1440bd7c0b4fb28ba8250d93695c61ac887685d/src/Omnipay/Common/Message/AbstractResponse.php#L186
The RedirectResponse extends the regular response, so the docblock should be just the normal Symfony\Component\HttpFoundation\Response
You can submit a PR to correct this.
The RedirectResponseInterface
should only be implemented when it's an actual redirect. Not all responses are redirects. So when a class implements a redirect, it should add the interface to the implementation. So that doesn't need to change.
Hi Barry,
in AbstractResponse.php I noticed the following inconsistencies (the master branch):
incorrect return type in
expected
use Symfony\Component\HttpFoundation\RedirectResponse as HttpRedirectResponse;
, actual:return HttpResponse::create($output);
which is:Symfony\Component\HttpFoundation\Response
the class implements a wrong interface (Omnipay\Common\Message\ResponseInterface):
methods getRedirectMethod, getRedirectUrl, getRedirectData aren't found in this interface; instead they're found in Omnipay\Common\Message\RedirectResponseInterface
Could you please explain these inconsistencies, and whether or not they should be corrected? Thank you!