Skip to content

Commit 7abd647

Browse files
Merge branch '4.4' into 5.1
* 4.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents b9545e0 + 4012fac commit 7abd647

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

AbstractBrowser.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,12 @@ public function request(string $method, string $uri, array $parameters = [], arr
352352

353353
$server = array_merge($this->server, $server);
354354

355-
if (!empty($server['HTTP_HOST']) && null === parse_url($originalUri, PHP_URL_HOST)) {
355+
if (!empty($server['HTTP_HOST']) && null === parse_url($originalUri, \PHP_URL_HOST)) {
356356
$uri = preg_replace('{^(https?\://)'.preg_quote($this->extractHost($uri)).'}', '${1}'.$server['HTTP_HOST'], $uri);
357357
}
358358

359-
if (isset($server['HTTPS']) && null === parse_url($originalUri, PHP_URL_SCHEME)) {
360-
$uri = preg_replace('{^'.parse_url($uri, PHP_URL_SCHEME).'}', $server['HTTPS'] ? 'https' : 'http', $uri);
359+
if (isset($server['HTTPS']) && null === parse_url($originalUri, \PHP_URL_SCHEME)) {
360+
$uri = preg_replace('{^'.parse_url($uri, \PHP_URL_SCHEME).'}', $server['HTTPS'] ? 'https' : 'http', $uri);
361361
}
362362

363363
if (!isset($server['HTTP_REFERER']) && !$this->history->isEmpty()) {
@@ -368,7 +368,7 @@ public function request(string $method, string $uri, array $parameters = [], arr
368368
$server['HTTP_HOST'] = $this->extractHost($uri);
369369
}
370370

371-
$server['HTTPS'] = 'https' == parse_url($uri, PHP_URL_SCHEME);
371+
$server['HTTPS'] = 'https' == parse_url($uri, \PHP_URL_SCHEME);
372372

373373
$this->internalRequest = new Request($uri, $method, $parameters, $files, $this->cookieJar->allValues($uri), $server, $content);
374374

@@ -437,9 +437,9 @@ protected function doRequestInProcess($request)
437437
foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) {
438438
if ($deprecation[0]) {
439439
// unsilenced on purpose
440-
trigger_error($deprecation[1], E_USER_DEPRECATED);
440+
trigger_error($deprecation[1], \E_USER_DEPRECATED);
441441
} else {
442-
@trigger_error($deprecation[1], E_USER_DEPRECATED);
442+
@trigger_error($deprecation[1], \E_USER_DEPRECATED);
443443
}
444444
}
445445
}
@@ -653,7 +653,7 @@ protected function getAbsoluteUri(string $uri)
653653

654654
// protocol relative URL
655655
if (0 === strpos($uri, '//')) {
656-
return parse_url($currentUri, PHP_URL_SCHEME).':'.$uri;
656+
return parse_url($currentUri, \PHP_URL_SCHEME).':'.$uri;
657657
}
658658

659659
// anchor or query string parameters?
@@ -662,7 +662,7 @@ protected function getAbsoluteUri(string $uri)
662662
}
663663

664664
if ('/' !== $uri[0]) {
665-
$path = parse_url($currentUri, PHP_URL_PATH);
665+
$path = parse_url($currentUri, \PHP_URL_PATH);
666666

667667
if ('/' !== substr($path, -1)) {
668668
$path = substr($path, 0, strrpos($path, '/') + 1);
@@ -689,7 +689,7 @@ protected function requestFromRequest(Request $request, $changeHistory = true)
689689
private function updateServerFromUri(array $server, string $uri): array
690690
{
691691
$server['HTTP_HOST'] = $this->extractHost($uri);
692-
$scheme = parse_url($uri, PHP_URL_SCHEME);
692+
$scheme = parse_url($uri, \PHP_URL_SCHEME);
693693
$server['HTTPS'] = null === $scheme ? $server['HTTPS'] : 'https' == $scheme;
694694
unset($server['HTTP_IF_NONE_MATCH'], $server['HTTP_IF_MODIFIED_SINCE']);
695695

@@ -698,9 +698,9 @@ private function updateServerFromUri(array $server, string $uri): array
698698

699699
private function extractHost(string $uri): ?string
700700
{
701-
$host = parse_url($uri, PHP_URL_HOST);
701+
$host = parse_url($uri, \PHP_URL_HOST);
702702

703-
if ($port = parse_url($uri, PHP_URL_PORT)) {
703+
if ($port = parse_url($uri, \PHP_URL_PORT)) {
704704
return $host.':'.$port;
705705
}
706706

HttpBrowser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function getBodyAndExtraHeaders(Request $request, array $headers): array
9191
return ['', []];
9292
}
9393

94-
return [http_build_query($fields, '', '&', PHP_QUERY_RFC1738), ['Content-Type' => 'application/x-www-form-urlencoded']];
94+
return [http_build_query($fields, '', '&', \PHP_QUERY_RFC1738), ['Content-Type' => 'application/x-www-form-urlencoded']];
9595
}
9696

9797
private function getHeaders(Request $request): array

0 commit comments

Comments
 (0)