Fixed namespace usages for polyfill packages

This commit is contained in:
Netkas 2022-10-18 21:07:38 -04:00
parent dd6ed279f0
commit d024acd1b7
8 changed files with 9 additions and 7 deletions

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use ncc\ThirdParty\Symfony\polyfill as p; use ncc\ThirdParty\Symfony\ctype as p;
if (\PHP_VERSION_ID >= 80000) { if (\PHP_VERSION_ID >= 80000) {
return require __DIR__.'/bootstrap80.php'; return require __DIR__.'/bootstrap80.php';

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use ncc\ThirdParty\Symfony\polyfill as p; use ncc\ThirdParty\Symfony\ctype as p;
if (!function_exists('ctype_alnum')) { if (!function_exists('ctype_alnum')) {
function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); }

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use ncc\ThirdParty\Symfony\polyfill as p; use ncc\ThirdParty\Symfony\mbstring as p;
if (\PHP_VERSION_ID >= 80000) { if (\PHP_VERSION_ID >= 80000) {
return require __DIR__.'/bootstrap80.php'; return require __DIR__.'/bootstrap80.php';

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use ncc\ThirdParty\Symfony\polyfill as p; use ncc\ThirdParty\Symfony\mbstring as p;
if (!function_exists('mb_convert_encoding')) { if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Symfony\Polyfill\Uuid; namespace ncc\ThirdParty\Symfony\uuid;
/** /**
* @internal * @internal

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use Symfony\Polyfill\Uuid as p; use ncc\ThirdParty\Symfony\uuid as p;
if (extension_loaded('uuid')) { if (extension_loaded('uuid')) {
return; return;

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use Symfony\Polyfill\Uuid as p; use ncc\ThirdParty\Symfony\uuid as p;
if (!defined('UUID_VARIANT_NCS')) { if (!defined('UUID_VARIANT_NCS')) {
define('UUID_VARIANT_NCS', 0); define('UUID_VARIANT_NCS', 0);

View file

@ -19,6 +19,8 @@
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-ctype' . DIRECTORY_SEPARATOR . 'bootstrap.php', $third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-ctype' . DIRECTORY_SEPARATOR . 'bootstrap.php',
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-mbstring' . DIRECTORY_SEPARATOR . 'autoload_spl.php', $third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-mbstring' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-mbstring' . DIRECTORY_SEPARATOR . 'bootstrap.php', $third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-mbstring' . DIRECTORY_SEPARATOR . 'bootstrap.php',
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-uuid' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill-uuid' . DIRECTORY_SEPARATOR . 'bootstrap.php',
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Process' . DIRECTORY_SEPARATOR . 'autoload_spl.php', $third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Process' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Uid' . DIRECTORY_SEPARATOR . 'autoload_spl.php', $third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Uid' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Filesystem' . DIRECTORY_SEPARATOR . 'autoload_spl.php', $third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Filesystem' . DIRECTORY_SEPARATOR . 'autoload_spl.php',