Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -23,7 +23,7 @@ final class UrlHelper
private $requestStack;
private $requestContext;
public function __construct(RequestStack $requestStack, ?RequestContext $requestContext = null)
public function __construct(RequestStack $requestStack, RequestContext $requestContext = null)
{
$this->requestStack = $requestStack;
$this->requestContext = $requestContext;
@@ -31,11 +31,11 @@ final class UrlHelper
public function getAbsoluteUrl(string $path): string
{
if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) {
if (str_contains($path, '://') || '//' === substr($path, 0, 2)) {
return $path;
}
if (null === $request = $this->requestStack->getMasterRequest()) {
if (null === $request = $this->requestStack->getMainRequest()) {
return $this->getAbsoluteUrlFromContext($path);
}
@@ -60,11 +60,11 @@ final class UrlHelper
public function getRelativePath(string $path): string
{
if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) {
if (str_contains($path, '://') || '//' === substr($path, 0, 2)) {
return $path;
}
if (null === $request = $this->requestStack->getMasterRequest()) {
if (null === $request = $this->requestStack->getMainRequest()) {
return $path;
}