Permalink
Browse files

Request::getReferer() returns UrlImmutable (BC break)

  • Loading branch information...
dg committed Feb 11, 2019
1 parent 6437f73 commit 1bd5d3f9bc0ee02552fa4c7d245b8a55097fc8f6
Showing with 5 additions and 3 deletions.
  1. +1 −1 src/Http/IRequest.php
  2. +4 −2 src/Http/Request.php
@@ -12,7 +12,7 @@
/**
* IHttpRequest provides access scheme for request sent via HTTP.
* @method Url|null getReferer() Returns referrer.
* @method UrlImmutable|null getReferer() Returns referrer.
*/
interface IRequest
{
@@ -208,9 +208,11 @@ public function getHeaders(): array
/**
* Returns referrer.
*/
public function getReferer(): ?Url
public function getReferer(): ?UrlImmutable
{
return isset($this->headers['referer']) ? new Url($this->headers['referer']) : null;
return isset($this->headers['referer'])
? UrlImmutable::fromString($this->headers['referer'])
: null;
}

0 comments on commit 1bd5d3f

Please sign in to comment.