Upgrade to php 8
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace App\Service;
|
||||
|
||||
use League\Uri\Http;
|
||||
use League\Uri\Components\Host;
|
||||
use League\Uri\Uri as Http;
|
||||
use League\Uri\Components\Domain as Host;
|
||||
use League\Uri\Components\HierarchicalPath;
|
||||
|
||||
class URL
|
||||
@ -19,7 +19,13 @@ class URL
|
||||
protected function findRoot()
|
||||
{
|
||||
$base = $_SERVER['HTTP_HOST'] . ((isset($_SERVER['HTTP_PORT'])) ? ':' . $_SERVER['HTTP_PORT'] : '');
|
||||
$scheme = $_SERVER['HTTPS'] ? 'https' : 'http';
|
||||
$scheme = 'http';
|
||||
if (isset($_SERVER['REQUEST_SCHEME'])) {
|
||||
$scheme = $_SERVER['REQUEST_SCHEME'];
|
||||
}
|
||||
if (isset($_SERVER['HTTPS'])) {
|
||||
$scheme = 'https';
|
||||
}
|
||||
$uri = Http::createFromString(\Sabre\Uri\resolve($scheme . '://' . $base, $_SERVER['SCRIPT_NAME']));
|
||||
$host = new Host($uri->getHost());
|
||||
if ($host->isAbsolute()) {
|
||||
|
@ -6,6 +6,7 @@
|
||||
"aldarien/contract" : "*",
|
||||
"aldarien/root" : "*",
|
||||
"league/uri": "*",
|
||||
"league/uri-components": "*",
|
||||
"sabre/uri": "*"
|
||||
},
|
||||
"require-dev" : {
|
||||
|
Reference in New Issue
Block a user