updated composer

This commit is contained in:
2021-05-18 13:47:03 +00:00
parent e248cd036c
commit ba92152daa
1187 changed files with 20804 additions and 22320 deletions

View File

@@ -69,19 +69,19 @@ final class Php80
public static function preg_last_error_msg(): string
{
switch (preg_last_error()) {
case PREG_INTERNAL_ERROR:
case \PREG_INTERNAL_ERROR:
return 'Internal error';
case PREG_BAD_UTF8_ERROR:
case \PREG_BAD_UTF8_ERROR:
return 'Malformed UTF-8 characters, possibly incorrectly encoded';
case PREG_BAD_UTF8_OFFSET_ERROR:
case \PREG_BAD_UTF8_OFFSET_ERROR:
return 'The offset did not correspond to the beginning of a valid UTF-8 code point';
case PREG_BACKTRACK_LIMIT_ERROR:
case \PREG_BACKTRACK_LIMIT_ERROR:
return 'Backtrack limit exhausted';
case PREG_RECURSION_LIMIT_ERROR:
case \PREG_RECURSION_LIMIT_ERROR:
return 'Recursion limit exhausted';
case PREG_JIT_STACKLIMIT_ERROR:
case \PREG_JIT_STACKLIMIT_ERROR:
return 'JIT stack limit exhausted';
case PREG_NO_ERROR:
case \PREG_NO_ERROR:
return 'No error';
default:
return 'Unknown error';
@@ -95,11 +95,11 @@ final class Php80
public static function str_starts_with(string $haystack, string $needle): bool
{
return 0 === \strncmp($haystack, $needle, \strlen($needle));
return 0 === strncmp($haystack, $needle, \strlen($needle));
}
public static function str_ends_with(string $haystack, string $needle): bool
{
return '' === $needle || ('' !== $haystack && 0 === \substr_compare($haystack, $needle, -\strlen($needle)));
return '' === $needle || ('' !== $haystack && 0 === substr_compare($haystack, $needle, -\strlen($needle)));
}
}

View File

@@ -3,19 +3,19 @@
#[Attribute(Attribute::TARGET_CLASS)]
final class Attribute
{
const TARGET_CLASS = 1;
const TARGET_FUNCTION = 2;
const TARGET_METHOD = 4;
const TARGET_PROPERTY = 8;
const TARGET_CLASS_CONSTANT = 16;
const TARGET_PARAMETER = 32;
const TARGET_ALL = 63;
const IS_REPEATABLE = 64;
public const TARGET_CLASS = 1;
public const TARGET_FUNCTION = 2;
public const TARGET_METHOD = 4;
public const TARGET_PROPERTY = 8;
public const TARGET_CLASS_CONSTANT = 16;
public const TARGET_PARAMETER = 32;
public const TARGET_ALL = 63;
public const IS_REPEATABLE = 64;
/** @var int */
public $flags;
public function __construct(int $flags = Attribute::TARGET_ALL)
public function __construct(int $flags = self::TARGET_ALL)
{
$this->flags = $flags;
}

View File

@@ -11,12 +11,12 @@
use Symfony\Polyfill\Php80 as p;
if (PHP_VERSION_ID >= 80000) {
if (\PHP_VERSION_ID >= 80000) {
return;
}
if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN);
define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
}
if (!function_exists('fdiv')) {
@@ -38,5 +38,5 @@ if (!function_exists('get_debug_type')) {
function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
}
if (!function_exists('get_resource_id')) {
function get_resource_id($res): int { return p\Php80::get_resource_id($res); }
function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
}

View File

@@ -30,7 +30,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",