Initial Commit
This commit is contained in:
33
dependencies/symfony/polyfill-php81/Php81.php
vendored
Normal file
33
dependencies/symfony/polyfill-php81/Php81.php
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?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\Php81;
|
||||
|
||||
/**
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class Php81
|
||||
{
|
||||
public static function array_is_list(array $array) : bool
|
||||
{
|
||||
if ([] === $array || $array === \array_values($array)) {
|
||||
return \true;
|
||||
}
|
||||
$nextKey = -1;
|
||||
foreach ($array as $k => $v) {
|
||||
if ($k !== ++$nextKey) {
|
||||
return \false;
|
||||
}
|
||||
}
|
||||
return \true;
|
||||
}
|
||||
}
|
45
dependencies/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
vendored
Normal file
45
dependencies/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace WP_Ultimo\Dependencies;
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
if (\PHP_VERSION_ID >= 70400 && \extension_loaded('curl')) {
|
||||
/**
|
||||
* @property string $data
|
||||
*/
|
||||
class CURLStringFile extends \CURLFile
|
||||
{
|
||||
private $data;
|
||||
public function __construct(string $data, string $postname, string $mime = 'application/octet-stream')
|
||||
{
|
||||
$this->data = $data;
|
||||
parent::__construct('data://application/octet-stream;base64,' . \base64_encode($data), $mime, $postname);
|
||||
}
|
||||
public function __set(string $name, $value) : void
|
||||
{
|
||||
if ('data' !== $name) {
|
||||
$this->{$name} = $value;
|
||||
return;
|
||||
}
|
||||
if (\is_object($value) ? !\method_exists($value, '__toString') : !\is_scalar($value)) {
|
||||
throw new \TypeError('Cannot assign ' . \gettype($value) . ' to property CURLStringFile::$data of type string');
|
||||
}
|
||||
$this->name = 'data://application/octet-stream;base64,' . \base64_encode($value);
|
||||
}
|
||||
public function __isset(string $name) : bool
|
||||
{
|
||||
return isset($this->{$name});
|
||||
}
|
||||
public function &__get(string $name)
|
||||
{
|
||||
return $this->{$name};
|
||||
}
|
||||
}
|
||||
}
|
21
dependencies/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
vendored
Normal file
21
dependencies/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace WP_Ultimo\Dependencies;
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
if (\PHP_VERSION_ID < 80100) {
|
||||
#[\Attribute(\Attribute::TARGET_METHOD)]
|
||||
final class ReturnTypeWillChange
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
28
dependencies/symfony/polyfill-php81/bootstrap.php
vendored
Normal file
28
dependencies/symfony/polyfill-php81/bootstrap.php
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
use Symfony\Polyfill\Php81 as p;
|
||||
|
||||
if (\PHP_VERSION_ID >= 80100) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) {
|
||||
define('MYSQLI_REFRESH_REPLICA', 64);
|
||||
}
|
||||
|
||||
if (!function_exists('array_is_list')) {
|
||||
function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
|
||||
}
|
||||
|
||||
if (!function_exists('enum_exists')) {
|
||||
function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; }
|
||||
}
|
Reference in New Issue
Block a user