mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 05:29:53 +09:00
Update to laravel 7
This commit is contained in:
15
vendor/symfony/polyfill-php73/Php73.php
vendored
15
vendor/symfony/polyfill-php73/Php73.php
vendored
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Polyfill\Php73;
|
||||
|
||||
/**
|
||||
@@ -19,8 +28,8 @@ final class Php73
|
||||
*/
|
||||
public static function hrtime($asNum = false)
|
||||
{
|
||||
$ns = \microtime(false);
|
||||
$s = \substr($ns, 11) - self::$startAt;
|
||||
$ns = microtime(false);
|
||||
$s = substr($ns, 11) - self::$startAt;
|
||||
$ns = 1E9 * (float) $ns;
|
||||
|
||||
if ($asNum) {
|
||||
@@ -29,6 +38,6 @@ final class Php73
|
||||
return \PHP_INT_SIZE === 4 ? $ns : (int) $ns;
|
||||
}
|
||||
|
||||
return array($s, (int) $ns);
|
||||
return [$s, (int) $ns];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class JsonException extends Exception
|
||||
{
|
||||
if (\PHP_VERSION_ID < 70300) {
|
||||
class JsonException extends Exception
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
34
vendor/symfony/polyfill-php73/bootstrap.php
vendored
34
vendor/symfony/polyfill-php73/bootstrap.php
vendored
@@ -11,21 +11,21 @@
|
||||
|
||||
use Symfony\Polyfill\Php73 as p;
|
||||
|
||||
if (PHP_VERSION_ID < 70300) {
|
||||
if (!function_exists('is_countable')) {
|
||||
function is_countable($var) { return is_array($var) || $var instanceof Countable || $var instanceof ResourceBundle || $var instanceof SimpleXmlElement; }
|
||||
}
|
||||
|
||||
if (!function_exists('hrtime')) {
|
||||
p\Php73::$startAt = (int) microtime(true);
|
||||
function hrtime($asNum = false) { return p\Php73::hrtime($asNum); }
|
||||
}
|
||||
|
||||
if (!function_exists('array_key_first')) {
|
||||
function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } }
|
||||
}
|
||||
|
||||
if (!function_exists('array_key_last')) {
|
||||
function array_key_last(array $array) { end($array); return key($array); }
|
||||
}
|
||||
if (\PHP_VERSION_ID >= 70300) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!function_exists('is_countable')) {
|
||||
function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; }
|
||||
}
|
||||
if (!function_exists('hrtime')) {
|
||||
require_once __DIR__.'/Php73.php';
|
||||
p\Php73::$startAt = (int) microtime(true);
|
||||
function hrtime($as_number = false) { return p\Php73::hrtime($as_number); }
|
||||
}
|
||||
if (!function_exists('array_key_first')) {
|
||||
function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } }
|
||||
}
|
||||
if (!function_exists('array_key_last')) {
|
||||
function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); }
|
||||
}
|
||||
|
||||
8
vendor/symfony/polyfill-php73/composer.json
vendored
8
vendor/symfony/polyfill-php73/composer.json
vendored
@@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Php73\\": "" },
|
||||
@@ -26,7 +26,11 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user