Skip to content

Added backwards compatibility layer #133

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

Merged
merged 1 commit into from
Dec 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Plugin/VersionBridgePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Http\Client\Common\Plugin;

use Http\Promise\Promise;
use Psr\Http\Message\RequestInterface;

/**
Expand All @@ -14,7 +15,7 @@ trait VersionBridgePlugin
{
abstract protected function doHandleRequest(RequestInterface $request, callable $next, callable $first);

public function handleRequest(RequestInterface $request, callable $next, callable $first)
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
return $this->doHandleRequest($request, $next, $first);
}
Expand Down
3 changes: 2 additions & 1 deletion src/VersionBridgeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Http\Client\Common;

use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

/**
* A client that helps you migrate from php-http/httplug 1.x to 2.x. This
Expand All @@ -14,7 +15,7 @@ trait VersionBridgeClient
{
abstract protected function doSendRequest(RequestInterface $request);

public function sendRequest(RequestInterface $request)
public function sendRequest(RequestInterface $request): ResponseInterface
{
return $this->doSendRequest($request);
}
Expand Down